How can i add CUPS-PDF

Here you can post about the issues related to modifications performed manually (not through the kiosk wizard). Example: swapped kernel, added 3rd party modules or files.
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
Woody
Ronin
Ronin
Posts: 3
Joined: 11 Dec 2018, 13:38
Distribution: Kiosk

How can i add CUPS-PDF

Post#1 by Woody » 11 Dec 2018, 15:39

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: How can i add CUPS-PDF

Post#2 by fanthom » 11 Dec 2018, 18:42

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?
Please add [Solved] to your thread title if the solution was found.

Woody
Ronin
Ronin
Posts: 3
Joined: 11 Dec 2018, 13:38
Distribution: Kiosk

Re: How can i add CUPS-PDF

Post#3 by Woody » 12 Dec 2018, 07:31

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: How can i add CUPS-PDF

Post#4 by fanthom » 12 Dec 2018, 09:40

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.
Please add [Solved] to your thread title if the solution was found.

Woody
Ronin
Ronin
Posts: 3
Joined: 11 Dec 2018, 13:38
Distribution: Kiosk

Re: How can i add CUPS-PDF

Post#5 by Woody » 12 Dec 2018, 12:28

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

Locked