LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-27-2017, 07:13 AM   #1
EternalCuriosity
LQ Newbie
 
Registered: Sep 2014
Location: Nepal
Distribution: RHEL
Posts: 16

Rep: Reputation: Disabled
Cups is not using the DefaultFont variable in my ppd


Hi all,

I'm printing through an app which passes lp command to pass the print job. The problem I'm facing is, even though the ppd file of the installed printer uses Courier as default font, I'm getting different font in output. I've tried changing the DefaultFont option in the driver file with no luck.

Does anybody here know how to change the default font used by the lp command or cups? It's been a while I'm stuck at this and will be really grateful.

Thanks in advance.

P.S: I'm in cli based Centos 6 environment.
 
Old 04-28-2017, 05:17 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,592

Rep: Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163
As far as I know there is no font option on the cups command line. I would guess the font is set by your app.

Can you post any information about your app?
 
Old 04-28-2017, 05:39 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,249

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
This article is illuminating as it describes how the modern CUPS workflow might be impacting here...
Quote:
With the new PDF workflow scheme implemented by Canonical under the scope of The OpenPrinting Project, texttops is actually replaced by texttopdf which must then be followed by pdftops.

For texttopdf to work, one or more character sets must be installed and then, one or more fonts that are referenced in the character sets may need to be installed.
It is worth reading this page in its entirety as it will help with the understanding and creating custom filters to provide the desired processing. In short the filter backends involved are likely to be undermining your desire to render (text files?) with a particular font. You could probably create a custom pdf that also includes the appropriate backend to allow rendering with your preferred font, but I accept that might not be worth the hassle to you.

Instead, I would suggest printing text files via enscript will do the trick nicely...
http://tech.surveypoint.com/posts/pr...with-enscript/

Last edited by ferrari; 04-28-2017 at 05:40 PM.
 
Old 04-28-2017, 05:51 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,592

Rep: Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163
CentOS 6 still uses a cups version < 1.6 as far as I know so the article is not 100% relevant. Not enough information posted about the app to know if it is a text document or a back end problem but I agree that enscript is good utility.
 
Old 04-28-2017, 06:36 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,249

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Very true. All the same I'm certain that the applied conversion filter is the cause of the issue here, and using enscript will be a simple means to an end.
 
Old 05-04-2017, 08:38 PM   #6
EternalCuriosity
LQ Newbie
 
Registered: Sep 2014
Location: Nepal
Distribution: RHEL
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thank you guys for your response. I've decided to create custom filter for my printer. If you have know some good documentations, can you help me with some links?
 
Old 05-05-2017, 01:01 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,249

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Official CUPS documentation:
https://www.cups.org/doc/api-filter.html

openSUSE wiki page:
https://en.opensuse.org/SDB:Using_Yo...rint_with_CUPS
 
Old 05-07-2017, 10:27 PM   #8
EternalCuriosity
LQ Newbie
 
Registered: Sep 2014
Location: Nepal
Distribution: RHEL
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Thanks ferrari. I'm marking this thread as solved.
 
Old 05-07-2017, 10:35 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,249

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Good luck with achieving your goal
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] .ppd files [CUPS] ROMUO Linux - Newbie 3 05-16-2015 01:04 PM
Links in /tmp to PPD Files in /etc/cups/ppd? tronayne Slackware 5 09-06-2012 06:58 AM
CUPS and ppd's...hmmmmm. ukpete1969 Red Hat 1 10-03-2006 05:45 AM
ppd in cups help elantbird Red Hat 0 01-15-2005 01:00 AM
ppd question in cups elantbird Slackware 1 01-14-2005 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:29 PM.

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