URL to PDF

Post Reply
cwswitch
Member
Posts: 71
Joined: Fri Feb 24, 2017 12:25 am

URL to PDF

Post by cwswitch » Sun Feb 18, 2018 11:48 pm

Already I can get a job ticket/job bag as a webpage from our MIS. Printing the PDF to the required desktop printer is already solved.

What I'm looking to do now is convert that webpage to a PDF so I can print it.

I have seen numerous websites that offer this facility, but not the kind of thing I can use with Switch.

I have a silly idea to do all this in an Ubuntu virtual machine, but that is a long process and a silly overhead just to achieve this.

Switch is running in a Windows box

Any ideas welcome! Thanks

Padawan
Member
Posts: 194
Joined: Mon Jun 12, 2017 8:48 pm

Re: URL to PDF

Post by Padawan » Mon Feb 19, 2018 10:25 am

It looks like this tool can do the job:
https://wkhtmltopdf.org/

It's a command line tool, so you should be able to use it using the Execute Command tool or via Switch scripting.

I haven't tried it myself, so I'm not sure on the quality.

Also, the webpage gives an example with a live url, if you want it to work with html pages, then you will have to use the stuff said here:
https://stackoverflow.com/questions/455 ... local-file

cwswitch
Member
Posts: 71
Joined: Fri Feb 24, 2017 12:25 am

Re: URL to PDF

Post by cwswitch » Mon Feb 19, 2018 9:17 pm

Excellent thanks. This had popped up in searches yesterday but I had got distracted with other options - the most promising of which seemed like Chrome Headless.

But yes, wkhtmltopdf seems to at least grab the page and make a PDF, which is excellent!

Now for the username, password, and all the other joys..

Many thanks

rick1221
Newbie
Posts: 1
Joined: Thu Jan 03, 2019 8:44 am

Re: URL to PDF

Post by rick1221 » Thu Jan 03, 2019 8:48 am

I was also looking for the answer to convert the URL file into the PDF file and I got to know from here what are the main things that need to be done. Converting the webpage to the pdf can be accessed.

Post Reply