Convert HTML document type to PDF using wkhtmltopdf

Contains tips for configurators working with Aware IM
Post Reply
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Convert HTML document type to PDF using wkhtmltopdf

Post by Rennur »

Guide on how to convert HTML to PDF with Aware IM
https://github.com/RennurApps/AwareIM-r ... h-aware-im

Download + Extract *.exe file to a folder (you can use 7-Zip), copy+paste wkhtmltopdf folder to c:/AwareIM
http://wkhtmltopdf.org/

Step 1 - Export Aware IM HTML Document to a HTML file

Code: Select all

EXPORT DOCUMENT 'Your HTML Document' TO FILE 'C:/YourFileLocation/<<myBO.Name>&glt;_No<<myBO.ID>>.html'
Step 2 - Convert exported HTML file to PDF

Code: Select all

EXECUTE PROGRAM 'C:\AwareIM\wkhtmltopdf\bin\wkhtmltopdf.exe file:///C:/YourFileLocation/<<myBO.Name>>_No<<myBO..ID>>.html C:/YourFileLocation/<<myBO.Name>>_No<<myBO.ID>>.pdf'
Step 3 - Import PDF document to your myBO.DocumentPDF attribute

Code: Select all

IMPORT DOCUMENT myBO.DocumentPDF FROM 'C:/YourFileLocation/<<myBO.Name>>_No<<myBO.ID>>.pdf'
Tip: You can store your folder location in systemsettings or LoggedIn business objects.

Cheers
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Convert HTML document type to PDF using wkhtmltopdf

Post by tford »

Thanks for the detailed post. This will be quite helpful!
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply