On Mon, Mar 3, 2025 at 6:00 PM Sean Hulbert <shulb...@securitycentric.net.invalid> wrote:
> Hello Mike and Nick, > > Would you be able to point me to the javascript code in Guacamole that > controls the Printer PDF? > I don't think there is any JavaScript code for this - I believe it's all done in C, by guacd, and guacd sends the PDF to the client, which then triggers a download. See: https://github.com/apache/guacamole-server/blob/main/src/protocols/rdp/channels/rdpdr/rdpdr-printer.c https://github.com/apache/guacamole-server/blob/main/src/protocols/rdp/channels/rdpdr/rdpdr-printer.h The code that handles the download of the PDF file from the printer is the same code that handles downloads of files using drive redirection: https://github.com/apache/guacamole-client/blob/main/guacamole/src/main/frontend/src/app/client/directives/guacFileTransfer.js https://github.com/apache/guacamole-client/blob/main/guacamole/src/main/frontend/src/app/client/types/ManagedFileTransferState.js https://github.com/apache/guacamole-client/blob/main/guacamole/src/main/frontend/src/app/client/types/ManagedFilesystem.js > I like to have me development team create a WAR file to connect > environment to local printers, much like RDP Drive mapping > While it may be possible to create a mapping to a printer on the server running guacd, similar to how the drive redirection works (which wouldn't be a WAR file, it would be C code), the last time I checked it is not possible, without some sort of client application/plugin, to handle client-side printers. There is no native JavaScript mechanism for accessing and handling printers, and, thus, no way to pass client printers through Guacamole to the remote system. Other software packages in the past used things like NPAPI or PPAPI plugins (Flash, Java, etc.) for this type of functionality, but, with the removal of all of those plugin frameworks from modern browsers, creating a plugin that handles this seems...difficult. All that said, I'm happy to be proven wrong about any of that :-). -Nick >