Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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:

share|improve this answer
1  
HTMLDOC (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 Jul 5 '10 at 10:41
    
I can not find a binary dowbload location for Windows, could you provide one please? –  George2 Jul 5 '10 at 16:19
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 Jul 5 '10 at 16:21
1  
@George2: Sure: google.com/… –  Kurt Pfeifle Jul 7 '10 at 16:51
1  
HTMLDOC'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. –  ajax81 Oct 26 '10 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.