Skip to main content

Thread: Ghostscript / CUPS-PDF default font problem


i'm using cups-pdf ubuntu 9.10 take print cups-pdf printer , send folder filename format of (jobname_yyyymmdd_hhmmss.pdf).

i've got working through configuring "cups-pdf.conf" , making few changes "apparmor.d/usr.sbin.cupsd" file, although i'm pretty sure set apparmor ignore cups altogether.

add twist i'm using xinetd.d lpr daemon take print jobs hp3000 mainframe running mpe/ix.

anyway, i've got pdfs naming correctly , showing in directory want them to, here's problem:

pdfs not searchable, i'm not sure why. pages aren't images, created using freemono , freemonobold embedded fonts. i'm wondering if font encoding problem. when select line of text pdf , try paste (in windows) "special" characters windows has no idea font use -> 􀁗􀁈􀁖􀁗

so, here's question... know how change default font ghostscript / cups-pdf use create pdf lpr text stream? think need go default of freemono , freemonobold courier_new , courier_new_bold, don't know change that...

appreciated
thanks,

cups-pdf.conf:

code:
#  cups-pdf.conf -- cups backend configuration (version 2.5.0, 2009-01-26) #  18.09.2005, volker c. behr #  experimentelle physik v, universitaet wuerzburg #  behr@physik.uni-wuerzburg.de #  http://www.cups-pdf.de # # #  code may freely distributed long header #  preserved. changes code should indicated.   # #  code distributed under gpl. #  (http://www.gnu.org/copyleft/gpl.html) # #  more detailed licensing information see cups-pdf.c in #  corresponding version number.                          ########################################################################### #                                      # # configuration file cups-pdf. values not set in # # here use defaults. changes take effect without # # need restarting services.                      # #                                      # # take care not add whitespaces @ end of line!          # #                                      # ###########################################################################   ########################################################################### #                                      # # path settings                                  # #                                      # ###########################################################################  ### key: out ##  cups-pdf output directory ##  special qualifiers: ##     ${home} expanded user's home directory ##     ${user} expanded user name ##  in case nfs export make sure exported without ##  root_squash! ### default: /var/spool/cups-pdf/${user}  out /pdf  ### key: anondirname ##  absolute path anonymously created pdf files ##  if anonymous access disabled setting has no effect ### default: /var/spool/cups-pdf/anonymous  anondirname /pdf  ### key: spool ##  cups-pdf spool directory - make sure there no user 'spool' on ##  system or change path    ### default: /var/spool/cups-pdf/spool  #spool /var/spool/cups-pdf/spool   ########################################################################### #                                      # # filename settings                              # #                                      # ###########################################################################  ### key: truncate ##  truncate long filenames maximum of <truncate> characters ##  not consider full path output filename ##  without .pdf-extension or job-id prefix (see 'label') ##  minimal value 8 ### default: 64  #truncate 64  ### key: cut ##  removing file name extensions before appending .pdf output ##  extensions removed if _both_ following criteria met: ##   - extension (w/o dot) not longer <cut> characters ##   - remaining filename has minimal length of 1 character ##  set cut -1 in order disable cutting ##  recommended values: pure unix environment : -1 ##                      mixed environments    :  3 ### default: 3  #cut 3  ### key: label ##  label jobs unique job-id in order avoid overwriting old ##  files in case new ones identical names created; true ##  untitled documents ##  0: label untitled documents only, 1: label documents ### default: 0  label 0  ### key: titlepref ##  first title when creating output filename ##  (title in ps file or title on commandline): ##  0: prefer title %title statement in ps file ##  1: prefer title passed via commandline ### default: 0  #titlepref 0   ########################################################################### #                                      # # user settings                                  # #                                      # ###########################################################################  ### key: anonuser ##  uid anonymous pdf creation (this might security issue) ##  setting has no influence on anondirname (see there) ##  set empty value disable anonymous ### default: nobody  #anonuser nobody  ### key: lowercase ##  options allows check user names given cups-pdf additionally ##  against lower case variants. necessary since in ##  windows environments upper case user names passed. unix ##  user names lower case , save use option  ##  aware can lead mis-identifications in case ##  have user names differ in upper/lower case. ##     check against user name passed cups  : 0 ##     check additionally against lower case user name : 1 ### default: 1  #lowercase 1  ### key: userprefix ##  installations require domain prefix added user name ##  leave empty no prefix ### default: <empty>  #userprefix  ### key: dirprefix ##  if prefix defined above switch toggels whether include ##  prefix in output directory's name (if not $home) or not ##  0: not include, 1: include ### default: 0  #dirprefix 0  ### key: removeprefix ##  installation pass usernames prefix (usually domain name) ##  if not want prefix used ${user} variable ##  output directories put part cut here ### default: <empty>  #removeprefix   ########################################################################### #                                      # # security settings                              # #                                      # ###########################################################################  ### key: anonumask ##  umask anonymous output ##  these _inverse_ permissions granted ### default: 0000  #anonumask 0000  ### key: userumask ##  umask user output of known users ##  changing can introduce security leaks if confidential ##  information processed! ### default: 0077  #userumask 0077  ### key: grp ##  group cups-pdf supposed run - gid ##  created directories , log files ### default: lp  grp lpadmin  ########################################################################### #                                      # # log settings                                  # #                                      # ###########################################################################  ### key: log ##  cups-pdf log directory ##  set empty value disable logging ### default: /var/log/cups  #log /var/log/cups  ### key: logtype ##  log-mode ##  1: errors ##  2: status (i.e. activity) ##  4: debug - generate lot of log-output! ##  add values combine options, i.e. 7 full logging ##  if logging disabled these setting have no effect ### default: 3  logtype 4   ########################################################################### #                                      # # pdf conversion settings                          # #                                      # ###########################################################################  ### key: ghostscript ##  location of ghostscript binary (gs) ##  macosx: using pstopdf (recommended) set /usr/bin/pstopdf ##          or proper location on system ### default: /usr/bin/gs  ghostscript /usr/bin/gs  ### key: gstmp ##  location of temporary files during ghostscript operation ##  must user-writable /var/tmp or /tmp ! ### default: /var/tmp  gstmp /var/tmp  ### key: gscall ## command line calling ghostscript (!!! not use newlines !!!) ## macosx: using pstopdf set %s %s -o %s %s ### default: %s -q -dcompatibilitylevel=%s -dnopause -dbatch -dsafer -sdevice=pdfwrite -soutputfile="%s" -dautorotatepages=/pagebypage -dautofiltercolorimages=false -dcolorimagefilter=/flateencode -dpdfsettings=/prepress -c .setpdfwrite -f %s  gscall %s -q -dcompatibilitylevel=%s -dnopause -dbatch -dsafer -sdevice=pdfwrite -soutputfile="%s" -dautorotatepages=/pagebypage -dautofiltercolorimages=false -dcolorimagefilter=/flateencode -dpdfsettings=/prepress -c .setpdfwrite -f %s  ### key: pdfver ##  pdf version created - can "1.5", "1.4", "1.3" or "1.2" ##  macosx: using pstopdf set empty value ### default: 1.4  #pdfver 1.4  ### key: postprocessing ##  postprocessing script called after creation of pdf ##  arguments filename of pdf, username determined ##  cups-pdf , 1 given cups-pdf passed ##  script called user privileges ##  set empty value use no postprocessing ### default: <empty>  postprocessing /usr/local/bin/cups-pdf-renamer.sh   ########################################################################### #                                                                         # # experimental settings                                                   # #   these settings activate experimental options. if decide use    # #   them appreciate feedback - including 'ok' if      # #   work expected - can put them non-         # #   experimental sections.                          # #                                                                         # ###########################################################################  ### key: decodehexstrings ##  option try decode hex strings in title allow ##  internationalized titles ##  (have @ contrib/pstitleconv suitable filter data ##   windows clients) ##  0: disable, 1: enable ### default: 0  #decodehexstrings 0
post processing script:

code:
#!/bin/sh filename=`basename $1` dirname=`dirname $1` date=$(date +%y%m%d_%h%m%s)  noextfilename=`basename $1 .pdf`  mv $1 $dirname"/"$noextfilename"_"$date".pdf"

i've gotten little closer issue may be...
has way embedded fonts in pdf encoded.

able pdf encoding change switching default
"cups-pdf postscript driver" "generic postscript driver" in ubuntu.

reason when using "cups-pdf driver" fonts
[truetype (cid), type-h encoded] when embedded pdf.
when copy word "test" pdf , paste get: 􀁗􀁈􀁖􀁗

when using "generic postscript driver" fonts
[truetype, custom encoded] when embedded pdf.
when copy word "test" pdf , paste get: whvw

think need find way embed font [truetype, ansi encoded]

have recommendations? i'm running out of ideas...

thanks,
chris

here sample pdf files encoding problems:
attached files attached files


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Ghostscript / CUPS-PDF default font problem


Ubuntu

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'