[Bug 1230427] New: xfig: export into PDF yields error "Cant use... before PDF1.5..."
https://bugzilla.suse.com/show_bug.cgi?id=1230427 Bug ID: 1230427 Summary: xfig: export into PDF yields error "Cant use... before PDF1.5..." Classification: openSUSE Product: openSUSE Tumbleweed Version: Slowroll Hardware: HP OS: openSUSE Tumbleweed Status: NEW Severity: Major Priority: P5 - None Component: Development Assignee: screening-team-bugs@suse.de Reporter: Rei3ner@arcor.de QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0 Build Identifier: Very simple fig file: ``` #FIG 3.2 Produced by xfig version 3.2.9 #encoding: UTF-8 Landscape Center Metric A4 100.00 Single -2 1200 2 4 0 0 50 -1 0 12 0.0000 4 132 363 3600 4050 PDF\001 ``` Exporting it yields an error message: ``` Error message from spawned process: GPL Ghostscript 10.03.1: Can't use Object streams before PDF 1.5, ignoring WriteObjStms directive GPL Ghostscript 10.03.1: Can't use XRef stream before PDF 1.5, ignoring WriteXRefStm directive ``` In fact there seems to be behind two errors, both related with using (maybe implicitly) a PDF version before 1.5. Reproducible: Always Steps to Reproduce: 1. Store the given file 2. load with xfig 3. export Actual Results: Abovementioned error message. Nevertheless, in this case, the output seems visually ok. Expected Results: according PDF file is created, no error message. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c2 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmueller@suse.com, | |jsmeix@suse.com --- Comment #2 from Dr. Werner Fink <werner@suse.com> --- Hmmm ... here your test file works flawless and gives PDF 1.4: werner/xfig> xfig test.fig werner/xfig> ll test.pdf -rw-r--r-- 1 werner suse 3442 Sep 12 11:26 test.pdf werner/xfig> file test.pdf test.pdf: PDF document, version 1.4, 1 page(s) werner/xfig> rpm -q xfig xfig-3.2.9-4.1.x86_64 werner/xfig> rpm -q transfig transfig-3.2.9-3.1.x86_64 rpm -q ghostscript ghostscript-10.02.1-4.1.x86_64 means that this seems to be caused by a newer ghostscript -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c3 --- Comment #3 from Dr. Werner Fink <werner@suse.com> --- fig2dev-3.2.9/fig2dev/dev/genpdf.c: #ifdef GSEXE #define GSFMT GSEXE " -q -dSAFER -dAutoRotatePages=/None -sDEVICE=pdfwrite " \ "-dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -o '%s' -" #else #define GSFMT "" #endif ... No idea what side effects will happen if I increase the Level to 1.5 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c5 --- Comment #5 from Dr. Werner Fink <werner@suse.com> --- From changelog of ghostscript * As of this release (10.03.0) pdfwrite creates PDF files with XRef streams and ObjStm streams. This can result in considerably smaller PDF output files. See Vector Devices https://ghostscript.readthedocs.io/en/latest/VectorDevices.html for more details. * Ghostscript/pdfwrite now supports passing through PDF "Optional Content". only the question rises if -dCompatibilityLevel=1.4 is given why does ghostscript with its pdfwrite engine does show the messages about WriteObjStms and WriteXRefStm ... Could be a bug in ghostscript pdfwrite engine -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c6 --- Comment #6 from Dr. Werner Fink <werner@suse.com> --- (In reply to Johannes Meixner from comment #4)
I am not at all a PDF expert but I guess
---------------------------------------------------------- -dWriteXRefStm=boolean Controls whether the pdfwrite device will use an XRef stream in the output file instead of a regular xref table. This switch defaults to true, however if the output file is less than PDF 1.5 then XRef streams are not supported, and it will be set to false. ... -dWriteObjStms=boolean Controls whether the pdfwrite device will use ObjStms to store non-stream objects in the output file. This switch defaults to true, however if the output file is less than PDF 1.5, or XRef streams are disabled then ObjStms are not supported and this switch will be set to false. ----------------------------------------------------------
Ah ... adding -dWriteXRefStm=false and -dWriteObjStms=false could also help thanks for the pointer! -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c7 --- Comment #7 from Dr. Werner Fink <werner@suse.com> --- The statments:
This switch defaults to true, however if the output file is less than PDF 1.5 then XRef streams are not supported, and it will be set to false.
This switch defaults to true, however if the output file is less than PDF 1.5, or XRef streams are disabled then ObjStms are not supported and this switch will be set to false.
seems not fully true as with -dCompatibilityLevel=1.4 both switches should be set to false. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c8 --- Comment #8 from Dr. Werner Fink <werner@suse.com> --- As workaround the gswrap could be installed as this ignores warings -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c9 --- Comment #9 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1230427) was mentioned in https://build.opensuse.org/request/show/1200547 Factory / transfig -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c10 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Dr. Werner Fink <werner@suse.com> --- (In reply to OBSbugzilla Bot from comment #9)
This is an autogenerated message for OBS integration: This bug (1230427) was mentioned in https://build.opensuse.org/request/show/1200547 Factory / transfig -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230427 https://bugzilla.suse.com/show_bug.cgi?id=1230427#c12 --- Comment #12 from Dr. Werner Fink <werner@suse.com> --- (In reply to Ernst Reißner from comment #11)
(In reply to Dr. Werner Fink from comment #10)
(In reply to OBSbugzilla Bot from comment #9)
This is an autogenerated message for OBS integration: This bug (1230427) was mentioned in https://build.opensuse.org/request/show/1200547 Factory / transfig
Hm, wouldn't it be the better alternative to upgrade to PDF 1.5 to use the improvements, instead of hiding that things are not as maybe expected? If the PDF becomes smaller, welcome.
I can not guarantee that this will work. Fact is that even if PDFSETTINGS=/prepress is used genpdf.c seems to support PDF 1.4 only ... and as we have seen the pdfwrite engine of ghostscript throw other warings as well ... also the coloring scheme has changed between 1.4 and 1.5 https://helpx.adobe.com/de/acrobat/using/pdf-conversion-settings.html -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com