[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881117: marked as done (Printing a pdf with non-ascii title with evince fails)



Your message dated Fri, 17 Jan 2020 15:11:54 +0100
with message-id <14360757.WXQsBuZONe@odyx.org>
and subject line Re: Bug#818469: /usr/share/hplip/base/sixext.py: Printing from some PDF files fails in  pdftops conversion with python UTF8 error
has caused the Debian Bug report #818469,
regarding Printing a pdf with non-ascii title with evince fails
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
818469: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818469
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: hplip
Version: 3.16.11+repack0-3

Package: evince
Version: 3.22.1-3+deb9u1

Dear Debian Developers,

I can't print a pdf with a title that has a non-ascii character (possibly) with evince. It looks like evince's handling of the pdf (ps conversion?) seems to cause it. qpdfviewer works just find. lp also works fine. The cups error log is appended but the important bit is:

D [07/Nov/2017:23:17:25 +0100] [Job 114] os.write(output_fd, to_bytes_utf8(\'@PJL SET JOBNAME=\"%s\"\\x0a\' % title))
D [07/Nov/2017:23:17:25 +0100] [Job 114] File \"/usr/share/hplip/base/sixext.py\", line 109, in to_bytes_utf8
D [07/Nov/2017:23:17:25 +0100] [Job 114] return s.encode(\"utf-8\")
D [07/Nov/2017:23:17:25 +0100] [Job 114] UnicodeEncodeError: \'utf-8\' codec can\'t encode character \'\\udcc3\' in position 21: surrogates not allowed

It looks the pdf 'Title:' may not contain an ä (or the like).

I guess it has to be evince, but it also appears that hplip could better handle pdf metadata.

Thanks!
Brian

Tex file
cat > test.tex << end_tex
% Intended LaTeX compiler: pdflatex
\documentclass[DIV=14,
                                fontsize=11pt,
                                parskip=half,
                                backaddress=false,
                                fromemail=true,
                                fromphone=true,
                              fromalign=left]{scrlttr2}
                             \usepackage[ngerman, germanb]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\KOMAoption{fromurl}{false}
\LoadLetterOption{SN}
\setkomavar{fromname}{Brian O}
\setkomavar{fromemail}{}
\KOMAoption{fromemail}{false}
\KOMAoption{fromphone}{true}
\setkomavar{signature}{Brian  O}
\KOMAoption{backaddress}{false}
\setkomavar{place}{Earth}
\KOMAoptions{foldmarks=true}
\date{den 08.11.2017}
\hypersetup{
 pdfauthor={Brian O},
 pdftitle={Banänas!},
 pdflang={Germanb}}
\begin{document}
\setkomavar{title}{Banänas!}
\begin{letter}{%
Universe}
\opening{We the people\ldots{}}
\ldots{}like bananas!
And apples!
\closing{Feed me}
\end{letter}
\end{document}
end_tex
pdflatex test.tex

CUPS error log:

[Job 114] Job stopped due to filter errors; please consult the error_log file for details.
[Job 114] The following messages were recorded from 23:17:11 to 23:17:25
[Job 114] Adding start banner page "none".
[Job 114] Queued on "HP_LaserJet_600_M602" by "".
[Job 114] Auto-typing file...
[Job 114] Request file type is application/pdf.
[Job 114] File of type application/pdf queued by "".
[Job 114] Adding end banner page "none".
[Job 114] time-at-processing=1510093031
[Job 114] 3 filters for job:
[Job 114] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
[Job 114] pdftops (application/vnd.cups-pdf to application/vnd.cups-postscript, cost 100)
[Job 114] hpps (application/vnd.cups-postscript to printer/HP_LaserJet_600_M602, cost 0)
[Job 114] job-sheets=none,none
[Job 114] argv[0]="HP_LaserJet_600_M602"
[Job 114] argv[1]="114"
[Job 114] argv[2]=""
[Job 114] argv[3]="Banänas!"
[Job 114] argv[4]="1"
[Job 114] argv[5]="noCollate cups-browsed cups-browsed-dest-printer=\\\"38\\ barry.local:631\\\" Duplex=None HPEconoMode HPEdgeToEdge HPFIDigit=0 HPFTDigit=0 HPPaperSource=AutomaticallySelect noHPPinPrnt HPPrintQuality=600dpi HPSEDigit=0 HPTHDigit=0 job-uuid=urn:uuid:5e668a8e-b163-390d-47e5-d5d9159b4e18 MediaType=Unspecified number-up=1 OutputBin=None PageSize=A4 job-originating-host-name=192.168.0.29 date-time-at-creation= date-time-at-processing= time-at-creation=1510093031 time-at-processing=1510093031"
[Job 114] argv[6]="/var/spool/cups/d00114-001"
[Job 114] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
[Job 114] envp[1]="CUPS_DATADIR=/usr/share/cups"
[Job 114] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
[Job 114] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
[Job 114] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
[Job 114] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
[Job 114] envp[6]="CUPS_SERVERROOT=/etc/cups"
[Job 114] envp[7]="CUPS_STATEDIR=/var/run/cups"
[Job 114] envp[8]="HOME=/var/spool/cups/tmp"
[Job 114] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
[Job 114] envp[10]="SERVER_ADMIN=root@barry"
[Job 114] envp[11]="SOFTWARE=CUPS/2.2.1"
[Job 114] envp[12]="TMPDIR=/var/spool/cups/tmp"
[Job 114] envp[13]="USER=root"
[Job 114] envp[14]="CUPS_MAX_MESSAGE=2047"
[Job 114] envp[15]="CUPS_SERVER=/var/run/cups/cups.sock"
[Job 114] envp[16]="CUPS_ENCRYPTION=IfRequested"
[Job 114] envp[17]="IPP_PORT=631"
[Job 114] envp[18]="CHARSET=utf-8"
[Job 114] envp[19]="LANG=en_US.UTF-8"
[Job 114] envp[20]="PPD=/etc/cups/ppd/HP_LaserJet_600_M602.ppd"
[Job 114] envp[21]="RIP_MAX_CACHE=128m"
[Job 114] envp[22]="CONTENT_TYPE=application/pdf"
[Job 114] envp[23]="DEVICE_URI=hp:/usb/HP_LaserJet_600_M602?serial=CNBVCDQ02X"
[Job 114] envp[24]="PRINTER_INFO=HP LaserJet 600 M602"
[Job 114] envp[25]="PRINTER_LOCATION=home"
[Job 114] envp[26]="PRINTER=HP_LaserJet_600_M602"
[Job 114] envp[27]="PRINTER_STATE_REASONS=none"
[Job 114] envp[28]="CUPS_FILETYPE=document"
[Job 114] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
[Job 114] envp[30]="AUTH_I****"
[Job 114] Started filter /usr/lib/cups/filter/pdftopdf (PID 6473)
[Job 114] Started filter /usr/lib/cups/filter/pdftops (PID 6474)
[Job 114] Started filter /usr/lib/cups/filter/hpps (PID 6475)
[Job 114] Started backend /usr/lib/cups/backend/hp (PID 6476)
[Job 114] pdftops - copying to temp print file \"/var/spool/cups/tmp/0194a5a0e2e85\"
[Job 114] pdftopdf: Last filter determined by the PPD: hpps; FINAL_CONTENT_TYPE: application/vnd.cups-postscript => pdftopdf will log pages in page_log.
[Job 114] PAGE: 1 1
[Job 114] PID 6473 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
[Job 114] Printer make and model: HP HP LaserJet 600 M603
[Job 114] Switching to Poppler\'s pdftops instead of Ghostscript for old HP LaserJet (\"LaserJet <number>\", no letters before <number>) printers to work around bugs in the printer\'s PS interpreters
[Job 114] Running command line for pstops: pstops 114  Banänas! 1 \'cups-browsed cups-browsed-dest-printer=\\\"38\\ barry.local:631\\\" Duplex=None HPEconoMode HPEdgeToEdge HPFIDigit=0 HPFTDigit=0 HPPaperSource=AutomaticallySelect noHPPinPrnt HPPrintQuality=600dpi HPSEDigit=0 HPTHDigit=0 job-uuid=urn:uuid:5e668a8e-b163-390d-47e5-d5d9159b4e18 MediaType=Unspecified OutputBin=None PageSize=A4 job-originating-host-name=192.168.0.29 date-time-at-creation= date-time-at-processing= time-at-creation=1510093031 time-at-processing=1510093031\'
[Job 114] Using image rendering resolution 600 dpi
[Job 114] Running command line for pdftops: pdftops -level2 -origpagesizes -nocenter -r 600 /var/spool/cups/tmp/0194a5a0e2e85 -
[Job 114] Started filter pdftops (PID 6477)
[Job 114] Started filter pstops (PID 6478)
[Job 114] Page = 595x842; 12,12 to 583,830
[Job 114] slow_collate=0, slow_duplex=0, slow_order=0
[Job 114] Before copy_comments - %!PS-Adobe-3.0
[Job 114] %!PS-Adobe-3.0
[Job 114] %Produced by poppler pdftops version: 0.48.0 (http://poppler.freedesktop.org)
[Job 114] %%Creator: cairo 1.14.8 (http://cairographics.org)
[Job 114] %%LanguageLevel: 2
[Job 114] %%DocumentSuppliedResources: (atend)
[Job 114] %%DocumentMedia: A4 595 842 0 () ()
[Job 114] %%BoundingBox: 0 0 596 842
[Job 114] %%Pages: 1
[Job 114] %%EndComments
[Job 114] Before copy_prolog - %%BeginProlog
[Job 114] Before copy_setup - %%BeginSetup
[Job 114] Before page loop - %%Page: 1 1
[Job 114] Copying page 1...
[Job 114] pagew = 571.0, pagel = 818.0
[Job 114] bboxx = 0, bboxy = 0, bboxw = 595, bboxl = 842
[Job 114] PageLeft = 12.0, PageRight = 583.0
[Job 114] PageTop = 830.0, PageBottom = 12.0
[Job 114] PageWidth = 595.0, PageLength = 842.0
[Job 114] Wrote 1 pages...
[Job 114] PID 6477 (pdftops) exited with no errors.
[Job 114] PID 6478 (pstops) exited with no errors.
[Job 114] PID 6474 (/usr/lib/cups/filter/pdftops) exited with no errors.
[Job 114] STATE: +connecting-to-device
[Job 114] Traceback (most recent call last):
[Job 114] File \"/usr/lib/cups/filter/hpps\", line 203, in <module>
[Job 114] os.write(output_fd, to_bytes_utf8(\'@PJL SET JOBNAME=\"%s\"\\x0a\' % title))
[Job 114] File \"/usr/share/hplip/base/sixext.py\", line 109, in to_bytes_utf8
[Job 114] return s.encode(\"utf-8\")
[Job 114] UnicodeEncodeError: \'utf-8\' codec can\'t encode character \'\\udcc3\' in position 21: surrogates not allowed
[Job 114] STATE: -connecting-to-device
[Job 114] STATE: -media-empty-error,media-jam-error,hplip.plugin-error,cover-open-error,toner-empty-error,other
[Job 114] PID 6475 (/usr/lib/cups/filter/hpps) stopped with status 1.
[Job 114] Hint: Try setting the LogLevel to "debug" to find out more.
[Job 114] ready to print
[Job 114] PID 6476 (/usr/lib/cups/backend/hp) exited with no errors.
[Job 114] End of messages
[Job 114] printer-state=3(idle)
[Job 114] printer-state-message="ready to print"
[Job 114] printer-state-reasons=none


--- End Message ---
--- Begin Message ---
Version: 3.16.11+repack0-3

Le jeudi, 17 mars 2016, 11.34:30 h CET jgiemail-debian@yahoo.es a écrit :
> Package: hplip-data
> Version: 3.16.2+repack0-7
> Severity: normal
> File: /usr/share/hplip/base/sixext.py
> Tags: patch
> 
> Dear Debian Maintainer,
> 
> Trying to print some PDF files from atril (MATE's desktop environment
> viewer) fails with print error:
> 
> "There was a problem processing document ..."

A patch for this was included in 3.16.11+repack0-3.

    OdyX

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply to: