LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2015, 04:39 PM   #1
deerewright
LQ Newbie
 
Registered: Oct 2015
Distribution: Ubuntu, Raspian
Posts: 21

Rep: Reputation: Disabled
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?
 
Old 10-31-2015, 10:19 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,154

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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.
 
1 members found this post helpful.
Old 10-31-2015, 06:08 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,639

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
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
 
Old 11-09-2015, 11:21 AM   #4
deerewright
LQ Newbie
 
Registered: Oct 2015
Distribution: Ubuntu, Raspian
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tredegar View Post
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.
 
Old 11-10-2015, 11:44 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,154

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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.
 
Old 11-12-2015, 06:55 AM   #6
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by tredegar View Post
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.
 
Old 11-12-2015, 06:27 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS ERROR: [Job ???] Request file type is text/plain. (CUPS on ARM architectu abhinit Linux - Software 3 04-22-2011 03:19 AM
Cups Custom Size Page alek66 Linux - Software 0 07-28-2009 04:50 PM
I used to know how to add/modify custom CUPS interface files - not now! gtjmn308 Linux - Newbie 3 03-21-2009 07:30 AM
How to create/install a custom CUPS version jpostma Slackware 1 07-25-2007 06:57 PM
Custom cups printers in slackware bman2 Slackware 0 10-10-2005 07:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration