add rmfilter cups fitler

This commit is contained in:
evan 2021-03-28 23:38:51 -05:00
parent 96ef3a5469
commit 60ebff70a8
3 changed files with 13 additions and 1 deletions

View file

@ -41,6 +41,7 @@ install_config:
-v socket://$(host) \
-P remarkable.ppd
# -m lsb/usr/cupsfilters/Generic-PDF_Printer-PDF.ppd
sudo cp rmfilter /usr/lib/cups/filter
clean:
rm -f printer.x86 printer.arm release.zip

View file

@ -40,7 +40,7 @@
*JCLToPDFInterpreter: "@PJL ENTER LANGUAGE = PDF<0A>"
*JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
*cupsFilter: "application/vnd.cups-pdf 0 -"
*cupsFilter2: "application/pdf application/vnd.cups-pdf 0 -"
*cupsFilter2: "application/pdf application/vnd.cups-pdf 0 rmfilter"
*OpenGroup: General/General
*JCLOpenUI *PageSize/Page Size: PickOne

11
rmfilter Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# send job name
echo -n "@PJL JOB NAME = "
echo "\"$3\""
# accept PDF as argument or from stdin
if [ -n "$6" ]
then
cat "$6"
else
cat
fi