Defining print information

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
billb
Posts: 6
Joined: Fri Jan 16 2004

Defining print information

Post by billb »

I've recently come across this product and it is the best we've found so far. My supervisor is quite interested in purchasing several licenses as long as we can control printing in some way (I'll be more specific in a moment).

We have an application that we've built that outputs files through GDI calls and uses a print to file (or print to printer) and when we set the Amyuni PDF print driver, we get PDF. This is perfect. However, our files contain PCL control codes to control the printing, namely duplexing. Is there a code we can pass the Amyuni print driver to specify duplexing?

I know that the driver does not actually send anything to the printer, so what I was thinking is that we could pass a comment to the pdf file that contains the printer settings and we'll write a program that will parse the PDF file for comments and set the printer accordingly.

I'm open to any ideas to make this work an automated fashion.

Thank you.
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

Post by Dany »

As you are printing using C++, you are somewhere creating a DEVMODE structure that contains the printer parameters. These parameters include the copies and duplex settings for the printer. These settings are usually ignored with PDF printers because the PDF specs do not have any provision for duplexing or printing N copies. The PDF Converter will however add private tags to the PDF file, these private tags are then interpreted correctly when the PDF is printed to a hardware printer using either the PDF Creator or PDF Converter.

In summary, the procedure is:
1 - Create a DEVMODE structure and set the duplex flag or number of copies. For details about using the DEVMODE structure, visit:
http://www.amyuni.com/en/support/technotes.html
2 - Print your document to the PDF printer using the DEVMODE structure created above
3 - Print the PDF to a hardware printer using the CDIntf.Document class or PDFCreactiveX.PDFCreativeX class

If you need parameters other than Copies or Duplex, let us know so that we can consider adding them to the PDF Converter.
billb
Posts: 6
Joined: Fri Jan 16 2004

Post by billb »

Thanks for the help. Now is the devmode structure stored in the PDF somewhere for later retrieval? We need a way to go back to a PDF long after it has been generated and perform a reprint. We need to reprint w/ the same parameters as when it was generated.

Sorry if I missed that and thanks again for the help so far.
billb
Posts: 6
Joined: Fri Jan 16 2004

Post by billb »

Never mind. I believe I was making it harder than it actually was. Everything with the duplexing is working great! Very impressed with the library thusfar.
Post Reply