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

19,651

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:
19,651

Related videos on Youtube

George2
Author by

George2

Updated on September 17, 2022

Comments

  • George2
    George2 almost 2 years

    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?

  • Kurt Pfeifle
    Kurt Pfeifle almost 14 years
    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.
  • George2
    George2 almost 14 years
    I can not find a binary dowbload location for Windows, could you provide one please?
  • George2
    George2 almost 14 years
    @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
    George2 almost 14 years
    @Stephen, I tried DocConverter is not free, I need a free one which works on command line, any recommendations?
  • George2
    George2 almost 14 years
    @Stephen, I find TotalHTMLConverter is also not free, any free ones to recommend? :-)
  • Kurt Pfeifle
    Kurt Pfeifle almost 14 years
    @George2: Sure: google.com/…
  • Daniel Szabo
    Daniel Szabo over 13 years
    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.