LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Custom CUPS testprint file (https://www.linuxquestions.org/questions/linux-general-1/custom-cups-testprint-file-4175557319/)

deerewright 10-27-2015 04:39 PM

Custom CUPS testprint file
 
Is there a way to make a custom testprint file for CUPS? My current /usr/share/cups/data/testprint file contains the following:

Code:

#PDF-BANNER
Template default-testpage.pdf
Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-versio.....etc

I would like to use another pdf as Template, but trying that results in just the pdf printing without any of the 'Show' information. I have also tried editing default-testpage.pdf, with the same results. So, there must be something in the formatting of the pdf to allow for the 'Show' fields?

tredegar 10-31-2015 10:19 AM

It looks like cups is generating the test page on-the-fly.
cups uses the
Code:

Template filename
Show options

directives in /usr/share/cups/data/testprint to do this.

To use yourpdf.pdf instead then copy that file to /usr/share/cups/data/ and edit /usr/share/cups/data/testprint to read like this:
Code:

#PDF-BANNER
Template yourpdf.pdf
Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-version paper-size imageable-area job-id options time-at-creation time-at-processing

Then restart cups. That should do it.

John VV 10-31-2015 06:08 PM

what is your printer?

my HP has many many many potions


BUT

the default cups color wheel dose everything that is needed

depending on HOW it looks you can diagnose a problem
from a low setting on DPI to low black or low color

deerewright 11-09-2015 11:21 AM

Quote:

Originally Posted by tredegar (Post 5442840)
It looks like cups is generating the test page on-the-fly.
cups uses the
Code:

Template filename
Show options

directives in /usr/share/cups/data/testprint to do this.

To use yourpdf.pdf instead then copy that file to /usr/share/cups/data/ and edit /usr/share/cups/data/testprint to read like this:
Code:

#PDF-BANNER
Template yourpdf.pdf
Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-version paper-size imageable-area job-id options time-at-creation time-at-processing

Then restart cups. That should do it.


I already tried that, but it does not work. It just prints the pdf file none of the "show" information.

tredegar 11-10-2015 11:44 AM

Quote:

It just prints the pdf file none of the "show" information.
I just tried this - it prints yourpdf.pdf and, in my case, some of the extra information, but it is way off to the right and basically unreadable.

I do not know enough about the PDF "standard" to be able to help you further. Is there such a thing as a "PDF Editor"? It might be worth opening the original with such, and determining its properties.

maples 11-12-2015 06:55 AM

Quote:

Originally Posted by tredegar (Post 5447626)
I do not know enough about the PDF "standard" to be able to help you further. Is there such a thing as a "PDF Editor"? It might be worth opening the original with such, and determining its properties.

I know that LibreOffice Draw is capable of importing PDFs, but to save it you have to re-export it, which might lose any special properties that might be there.

Maybe open it up with less and see if there's anything readable? I know that I was surprised to find human-readable metadata in a image file once.

chrism01 11-12-2015 06:27 PM

Have a look at pdftk (pdf toolkit); its cli pdf editor with a lot of options.


All times are GMT -5. The time now is 08:14 AM.