Page 1 of 1

How can i add CUPS-PDF

Posted: 11 Dec 2018, 15:39
by Woody
Hello,

is it possible to add CUPS-PDF to Porteus Kiosk 4.7? I have tried several things but i am not able to get the CUPS-PDF printer working. The Make and Model of the installed Printer is always Local Raw Printer and the connection is file:///dev/null.
I have created a new module with a new entry in the opt\scripts\files\wizard\printers.d so i can select the CUPS-PDF printer during the setup. Also the ppd and compiled CUPS-PDF files are added to the module. After the install is completed i can find the ppd, cups-pdf.conf,... on the porteus kiosk system, but the printer is not working.

Thanks, best regards
Woody

Re: How can i add CUPS-PDF

Posted: 11 Dec 2018, 18:42
by fanthom
Hello Woody,

Chrome has 'Save as PDF' option available by default so maybe you could use it instead of 'cups-pdf'?

No need to enable the printing component at all - just unlock the 'Ctrl+P' shortcut and enable printing in Chrome policies:

Code: Select all

run_command=sed -i 's/C-p //' /etc/xdg/openbox/rc.xml; openbox --reconfigure; sed -e 's/"PrintingEnabled": false,/"PrintingEnabled": true,/' -e 's|"chrome://version",|"chrome://version", "chrome://print",|' -i $json
Unless i'm missing something?

Re: How can i add CUPS-PDF

Posted: 12 Dec 2018, 07:31
by Woody
Hello,

thank you for your reply. The situation is, that the user open PDF's and then prints them as a new PDF. My requirements are to add a watermark to those PDF, save the new PDF on a USB-stick and in best case limit the maximum allowed number of pages per print. I thought this would be easiest to do with the config file of the cups-pdf...

Thanks,
Woody

Re: How can i add CUPS-PDF

Posted: 12 Dec 2018, 09:40
by fanthom
If cups-pdf has such functionality (i'm not familiar with it) then its probably the easiest way to use it rather than importing PDF to some web based PDF editor, adding watermark, etc.

If you wont resolve this yourself then i can only suggest using 'kiosk customized builds' service.

Re: How can i add CUPS-PDF

Posted: 12 Dec 2018, 12:28
by Woody
Hello,

at the moment my solution on an ubuntu system is as follows:
Entry in cups-pdf.conf, where i call an PS-file, to add the watermark:
...
GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" /.../watermark.ps %s -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
...
and the watermark.ps file:
<<
/EndPage
{
2 eq { pop false }
{
gsave
/Helvetica_Bold 16 selectfont
.85 setgray 20 20 moveto 90 rotate (watermark) show
grestore
true
} ifelse
} bind
>> setpagedevice

so, this works on ubuntu, but i was not able to integrate this on porteus-kiosk, maybe there is an easier way to achieve this?

Thanks, best regards
Woody