On Sat, Dec 9, 2017 at 12:07 PM, Amarjeet Singh <[email protected]>
wrote:

> How can I append  print named action in the post script file  before
> ghostscript converts it into pdf ?
>
>
The GhostScript process created to handle each print job reads its input
from a pipe, while the Guacamole side of that process writes all data
received via RDP to the file descriptor on its end of the pipe:

https://github.com/apache/guacamole-server/blob/f72de10328ae39fcbf067333b0c2a2c9aecc441b/src/protocols/rdp/rdp_print_job.c#L623-L624

If you want to insert arbitrary PostScript before the PostScript received
from RDP, you would need to write() your PostScript before any of the data
received from RDP is written but after the initial "file" instruction is
sent, taking care to retry the write() in case GhostScript cannot read
everything written at once.

- Mike

Reply via email to