URL to PDF

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

URL to PDF

Post by cwswitch »

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
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: URL to PDF

Post by Padawan »

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: 78
Joined: Fri Feb 24, 2017 12:25 am

Re: URL to PDF

Post by cwswitch »

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 »

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