You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Ronald Torres <ro...@consultorres.com> on 2022/03/22 17:08:26 UTC

Printing Parameters for the PDF generated by RDP Remote Printer?

Hi,

Is there any way to define printing parameters such as margins when
printing in a RDP session to the virtual remote printer?

We have the following problem: The PDF generated by Guacamole remote
printer in a RDP Windows session has an offset in the top margin (12 mm or
0.5 inch) when compared to printing directly to the printer. The printer is
a dot matrix printer (required to generate several copies in pre-printed
format pages).

I see Ghostscript parameters defined in src/protocols/rdp/print-job.c the
definition in a constant guac_rdp_pdf_filter_command.  Is there any way to
define this parameters dynamically at the moment of printing?  The change
is required for a group of users for an specific print job.

-----------------------------------------------------------------------------------------
**
 * The command to run when filtering postscript to produce PDF. This must be
 * a NULL-terminated array of arguments, where the first argument is the
name
 * of the file to run.
 */
char* const guac_rdp_pdf_filter_command[] = {
    "gs",
    "-q",
    "-dNOPAUSE",
    "-dBATCH",
    "-dSAFER",
    "-dPARANOIDSAFER",
    "-sDEVICE=pdfwrite",
    "-sOutputFile=-",
    "-c",
    ".setpdfwrite",
    "-sstdout=/dev/null",
    "-f",
    "-",
    NULL
};
-----------------------------------------------------------------------------------------

Regards,


Ron Torres