Home › Forums › PDF24 Creator › Printing from the command line
- This topic has 4 replies, 1 voice, and was last updated 3 weeks ago by PDF24 Support.
-
AuthorPosts
-
2015-11-16 at 18:37 #4430PDF24Guest
how can I send a PDF file directly to a printer, in the command line
I need to print a pdf file, to a specific printer without open the file, and invoke the print from the command line in windows
2016-01-08 at 15:01 #4431AnonymousGuestI want also this feature!
2016-06-10 at 08:22 #4432AnonymousGuestYou can use the pdf24-docTool.exe. You can see the command line description of this tool by calling the doctool without arguments.
To send a file to a printer you have to use the following command:
pdf24-docTool.exe -shellPrint –printerName "PRINTER_NAME" "YOUR_FILE"
2021-02-02 at 11:19 #60453rennaroberto72ParticipantHi, I have pretty similar issue. I want to use the export function. I woul like to send directly the pages I wanto to export, but i cannot see the option to use in order to export only some pages.
I am able to get to the dialog to choose the document to export, but i still cannot perform the action in a single command:
"C:\Program Files\PDF24\pdf24-doctool.exe" -extractPages "...\Documents\pdfdocument.pdf"
where should I define the pages I want to export and where is the command to define the exported filename?
Thank you
2026-11-02 at 08:14 #65982PDF24 SupportModeratorHello,
sorry for the late reply.
-extractPagesof the DocTool only opens the dialog, it has no options for a page list or an output file name. Without a dialog, the PDF24 Toolbox can do this with a job file (-processJob):- Create a job file, e.g.
C:\Data\job.json(write backslashes in paths twice):
{ "action": "sortPdfPages", "pagesInfos": [ { "fileInfo": { "file": "C:\\Users\\name\\Documents\\pdfdocument.pdf", "name": "extract.pdf" }, "pages": [2, 3, 5] } ] }nameis the name of the new file,pagesthe pages to take over, in this order (write ranges as single pages). You can add more entries for further files.- Run the job:
"C:\Program Files\PDF24\pdf24-Toolbox.exe" -processJob C:\Data\job.json C:\Data\result.json- In
result.json,outputFileslists for each new PDF the path in the temp folder%TEMP%\PDF24(file) and the intended name (name). Copy the files from there to your folder.
Description of
-processJob: https://creator.pdf24.org/manual/11/#912-process-a-jobPrinting a file to a specific printer without opening it still works as described above:
pdf24-DocTool.exe -shellPrint -printerName "PRINTER_NAME" "YOUR_FILE"(https://creator.pdf24.org/manual/11/#11114-execute-the-print-command-using-shellexecute).Single extracts also work online: https://tools.pdf24.org/en/extract-pdf-pages
- Create a job file, e.g.
-
AuthorPosts
- You must be logged in to reply to this topic.