Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Multiple copies and duplex in PDF  (Read 15243 times)
Jeff M.
Posts: 40


« on: June 17, 2014, 11:08:01 am »

Hi,

Is there a way to 'set up' a PDF preview so that copies and duplexing is already set for the user.

I'm trying to get to a point where the user generates the document, views on screen in PDF then clicks print. 3 copies then come out printing double sided without the user needing to adjust settings each time.

I have tried fgl_report_setPrinterCopies(3) and fgl_report_setPrinterSides("two-sided-long-edge") but these don't affect settings within the .pdf (and presumably therefore are not meant to affect PDFs just direct output to the printer).

I have no idea if this is something PDFs cannot handle or if I'm approaching it in the wrong way but I would appreciate some help and feedback.

Thanks,

Jeff McFee
Alex G.
Four Js
Posts: 155


« Reply #1 on: June 17, 2014, 11:59:26 am »

Hi,
PDF, XLS and RTF preview is performed using the 4GL program gviewdoc.4gl (The application is provided in source at $GREDIR/gre/src/bin/gviewdoc.4gl).
That program uses a shellexec frontcall to view the document. The frontcall will launch whatever application is registered for handling files with the extension ".pdf" giving users the freedom to define alternatives. Typically this will be Acroread. Since we don't known what application will be launched I don't see how we could configure those presets (as far as I know the PDF format does not define them).
You could however have GRE create PDF files on the server and then use you own derived version of "gviewdoc.4gl" to view those.
This derived version could for example pass command line options to the viewing application for the required presets (If such options are offered by the viewing application).
Acroread has some undocumented switches for direct printing or for opening the print dialog (see http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf).
Other viewing applications may offer similar options.
Is viewing the report in GRV an alternative option? If yes, then you could add a "print" button to your application that prints with predefined presets (See API calls fgl_report_configureSVGPreview(), fgl_report_configureSVGCopies() and fgl_report_setSVGSheetCollate()).
>I have tried fgl_report_setPrinterCopies(3) ...
These API calls apply only to server based direct printing (fgl_report_selectDevice("Printer")).
Regards,
Alex
Jeff M.
Posts: 40


« Reply #2 on: June 17, 2014, 03:08:01 pm »

Hi Alex,

Thank you very much for the feedback.

I will look into this but on initial inspection it looks like we can't control these options in Acroread via the command line.

However, by specifying which printer on the command line we might be able to create a specific windows device with duplexing permanently on and the number of copies pre-set. Because this is for a very defined tasks where the same parameters will always be used this might be our solution.

Kind regards,

Jeff
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines