Summary: | Adobe Distiller cannot process PostScript file generated by poppler pdftops | ||
---|---|---|---|
Product: | poppler | Reporter: | Alex Korobkin <korobkin+lpad> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
china-visa-application.pdf - original pdf
Form DS-7002.pdf china-visa-application_pdftocairo.ps soy-pdftops.ps soyeulylich.pdf soy-cairo.ps |
Description
Alex Korobkin
2013-09-17 19:08:51 UTC
Created attachment 89534 [details]
Form DS-7002.pdf
Page 2 fails to print with pdftops
That's what I get when trying to open PS file of the form DS-7002 in Distiller: %%[ Error: invalidfont; OffendingCommand: xyshow ]%% Stack: [4.41773 0.0 2.16231 0.0 4.41773 0.0 4.41773 0.0 2.16231 0.0 5.76617 0.0] (84 0] (%%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %% Created attachment 91436 [details]
china-visa-application_pdftocairo.ps
china-visa-application.pdf converted with pdftocairo.
I tried to use poppler 0.24.4 and pdftocairo with the file china-visa-application.pdf, and printers along with Adobe Distiller choke on imagemask command there. This is how imagemask looks in the resulting PS file: imagemask Gar8O!!3<."p5&6Mu*H<lMpm`s8T;%s*la!#Nl!cb6!e-!5&ILgA~> Q 0 g BT This is what Distiller says: PAGE: 1 1 PAGE: 2 1 PAGE: 3 1 %%[ Error: undefined; OffendingCommand: imagemask Distiller; ErrorInfo: ImageType --nostringval-- ]%% Stack: -dict- Comment on attachment 89534 [details]
Form DS-7002.pdf
Removed, it is not directly related to this bug.
Another file that cannot be read by Distiller (tested with pdftops 0.24.5 and 0.25.3 -level3). GhostScript converts this file normally. pdftocairo converts it seemingly OK (Distiller can read it), but embedded Distiller engine in Ricoh printers produces "invalidfont" error. Original pdf: soyeulylich.pdf Converted by pdftops -level3: soy-pdftops.ps Created attachment 99884 [details]
soy-pdftops.ps
Created attachment 99885 [details]
soyeulylich.pdf
Distiller error output: %%[ Warning: Times-Italic not found, using Font Substitution. Font cannot be embedded. ]%% %%[ Warning: Times-Roman not found, using Font Substitution. Font cannot be embedded. ]%% %%[ Error: invalidfont; OffendingCommand: xyshow ]%% Stack: [2.49 0.0] (6.32 %%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %% > %%[ Warning: Times-Italic not found, using Font Substitution. Font cannot be embedded. ]%%
> %%[ Warning: Times-Roman not found, using Font Substitution. Font cannot be embedded. ]%%
> %%[ Error: invalidfont; OffendingCommand: xyshow ]%%
pdffonts shows:
name type encoding emb sub uni object ID
---------------------- ---------- ---------- --- --- --- ---------
TimesNewRoman,Italic TrueType WinAnsi no no no 6 0
TimesNewRoman TrueType WinAnsi no no no 7 0
Pdftops produces postscript which relies on the PS engine having
the fonts /Times-Roman and /Times-Italic built-in. Ie, if this
works then the pdftops output also should:
%!
/Times-Roman 24 selectfont
100 200 moveto (Times-Roman) show
/Times-Italic 24 selectfont
100 100 moveto (Times-Italic) show
showpage
%
Adding pdftops’ pdfMakeFont procedure should lead to a simplified ps
which demonstrates the error.
Pdftocairo, OTOH, uses fontconfig to find a substitute and embeds that
in the postscript. Here it ends up with the URW++ fonts from ghostscript.
Created attachment 112036 [details]
soy-cairo.ps
Just got reminded about this issue again. From what I understand, pdftocairo tries to embed a similar font but doesn't embed it correctly. If you convert that soyeulylich.pdf with pdftocairo -ps -level3 to PS (soy-cairo.ps attached), and then open it with Distiller, Distiller will complain that 'OBPNNK+TimesNewRomanPS-BoldMT' font cannot be extracted.
What can be done to improve it?
(In reply to Alex Korobkin from comment #11) > What can be done to improve it? Find out why Distiller doesn't like it. As far as I can see the fonts are embedded correctly and works on all the PostScript interpreters I have available to me. I don't have Distiller. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/449. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.