Generating PDF via command line in PDF Creator doesn't work, works in GUI

2

2

I'm using PDF Creator on Windows 7 and am having problems generating some PDFs from the command line that I don't when using the GUI.

I am using the following command, and my purpose is to use the command line to generate output PDF directly without user interaction in GUI:

pdfcreator.exe /IF"C:\test.html" /OF"C:\test.pdf"

I find that the command ends immediately, without any output on the console.

Any ideas what is wrong?

George2

Posted 2010-07-04T17:25:56.380

Reputation: 4 239

Answers

3

You cannot convert all file types directly to a PDF with PDFCreator. The command line interface accepts only Postscript or image files as input.

You can try using the /PF switch which is supposed to print a document using its default program. I don't have a Windows machine handy to see how well this works, but I imagine it'll launch your default browser, print, and close.

pdfcreator.exe /PF"C:\path\to\file.html"

You can also use a tool like one of the following:

Stephen Jennings

Posted 2010-07-04T17:25:56.380

Reputation: 21 788

1

HTMLDOC (http://www.htmldoc.org/) is another utility to directly convert HTML to PDF (or PostScript). Can be put to work on the commandline, with a GUI or as a web servicve.

– Kurt Pfeifle – 2010-07-05T10:41:28.423

I can not find a binary dowbload location for Windows, could you provide one please? – George2 – 2010-07-05T16:19:01.673

1@Stephen, I have tried using /PF still needs user interaction, which need to press the print button. Do you mean if we use ps as input file, then no user interaction is needed to convert (from ps) to PDF file? – George2 – 2010-07-05T16:21:37.843

@Stephen, I tried DocConverter is not free, I need a free one which works on command line, any recommendations? – George2 – 2010-07-05T16:27:45.817

@Stephen, I find TotalHTMLConverter is also not free, any free ones to recommend? :-) – George2 – 2010-07-05T16:37:19.960

1

@George2: Sure: http://www.google.com/search?hl=en&qscrl=1&q=htmldoc+binary+package+for+windows

– Kurt Pfeifle – 2010-07-07T16:51:53.427

1HTMLDOC's readme file states that it only supports up to HTML 3.2 and DOES NOT support CSS. I'd imagine that's a pretty critical shortcoming that most people should be aware of before trying it out. – Daniel Szabo – 2010-10-26T17:27:35.457