Jump to content
Sign in to follow this  
ericcsc

Print with CutePDF writer from C drive to pdf file

Recommended Posts

ericcsc

Hi

I have tried to figure it out how to convert the html file (c:commonreport.html) to pdf file but somehow i only managed to load report.html to Internet Explorer. I need help on the script to print it to pdf file.

1. Load the c:commonreport.html into Internet Explorer.

2. Print with cutepdf writer.

3. Save it into M:reportYYYY MM DD report.pdf

Appricate your helps.

Thank you.

Edited by ericcsc

Share this post


Link to post
Share on other sites
orbs

you have several options, the most notable are:

1) automate the virtual printing process to CutePDF

check and remember what the default printer is

briefly change the default printer to CutePDF

use ShellExecute() with verb "print"

wait for the CutePDF "Save As" dialog to appear

send() the keys that make up your file name + Enter

wait until printing is completed

restore the default printer

2) use a dedicated command line tool

go here: http://www.pdfforge.org/pdfcreator

here is an example of using it via command line or COM:

http://superuser.com/questions/614992/cutepdf-command-line-or-equivilant

enjoy!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×