Forum How do I...?

Printing Interface

bamofa
Hello,
Had a quick question regarding prince. Does prince have some sort of printing interface. Currently when when we generate from Windows the pdf we run it through some unix/linix server program in the back-end which is executed to generate the PDF. From my understanding that was used as there wasn't an option to print directly from Windows so the code the document had to be passed back to the server in order to do the printing.

Not sure If am Making sense, but wanted to know if prince perhaps has such an option.
mikeday
I'm not quite sure what you mean. When you say "print" do you mean generate a PDF file, or actually send that PDF file to a physical printer to print out on paper?
bamofa
@Mikeday, By print I mean sending the pdf file to a physical printer to print out on paper.
mikeday
Supposedly you can use Acrobat to do this, as described here:
AcroRd32.exe /t <file.pdf> <printer_name> <printer_driver> <printer_port>
bamofa
@mikedy thanks for the reply. will try that one out. Basically we would need it as part of batch processing. And if I am not mistaken. Using that approach would probably still open acrobat reader. What we wanted to achieve to do this without entirely relying on acrobat just in case users have different pdf readers installed.

thanks,
mikeday
How are you delivering the PDF file to users? If it's via a web browser, then you can't force it to print, but you can open the PDF file and include script in the PDF that will bring up the print dialog, using "prince-pdf-open-action: print" (described here).
bamofa
@Mikeday, Thanks for the speedy reply. Ok will attempt to explain to the best of my ability how doing it right now:
So we have an application that is ran from Windows, User's can use the application to view i/e order information. We give them a series of options to gain access to the pdf. The pdf conversion is done in the back end server side. If they choose to
: view the pdf, the pdf will just open after prince has completed the conversion.
: or email it out
: or print it of

users could have different pdf readers installed on their system (that is an issue that will probably be resolved later on our end).

In the instance they choose to print the document - the pdf is sent to a queue which deals with the printing printing (some conversion takes places). this is done in the pack-end (server) side before its passed back to the client printer. At that stage it gets printed. All this is done by a batch process.

So the plan would be if there was some sort of prince-printing interface that would we could call upon to just simply send the pdf to the client printer straight away without the additional step of having to push it through some server queue.

Hope I was able to explain it :|

Thanks
mikeday
So the PDF is already on the client machine, and you want to send it to the client printer. Currently you are sending the PDF to the server, and the server is sending it to the client printer.

Prince does not have support for sending PDF files to printers yet, but I would be surprised if there was no way to do this with some other third-party tool. How about this suggestion on StackOverflow.
bamofa
Oh that suggestion is fine. We have played around with it, but currently we don't know before hand what pdf reader uses have installed. But its ok if this option is not available yet.

Thanks for the help.