Mar 08 2024 08:22 AM - edited Mar 08 2024 08:26 AM
I have a gallery showing SharePoint items & beside each item we have a "Print" button, as follow:-
the print button should produce an image or pdf file that will get attached to the item, the generated image or pdf should; show the barcode and some of the item info below the barcode , as follow:-
We enabled barcodes inside the related SharePoint list as follow:-
so what is the best way to produce such as image or pdf file, and be able to print it using label printer. the expected image or document dimension should be 15 cm height with 10 cm width, so it can be printer using a label printer. any help or idea of this ?
Thanks
Mar 09 2024 09:45 AM
Option 1:
1. On Print barcode button click, create an HTML string and put the list item details where you need in that HTML (you can add these values in Power Automate workflow as well)
2. Send HTML string to Power Automate Workflow to create PDF and attach with same item in the SharePoint list.
3. Create PDF from HTML follow this
Option 2:
1. On Print Barcode button start workflow to create PDF from HTML
2. Build your HTML in workflow
3. Convert HTML to PDF
4. Attach PDF as attachment to the List Item
sample HTML string: