Jump to content

Recommended Posts

Posted (edited)

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
Posted

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!

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...