New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printing pad to pdf is missing endobj in some cases #13560
Comments
I ran your macro on Mac. The generated file is attached. It can be opened without problem using the Mac utility "Preview". |
Yes opening the pdf is fine. i just get warnings when using ghostscript to convert the pdf with EmbedFonts. These are not critical but also not needed in my opinion. One could just get rid of them by implementing the Do you not get warnings during the macro from ghostscript on mac? |
I do not see any warnings with
|
I get this:
|
Ok strange. Maybe it is due to gs version? I am using default centos7 version and i get the warnings. |
Let me check if Ghostscript is really called in my case... |
you version is defnitly different to mine. Maybe they changed something over the years and now these warnings apear. |
The command executed by root is:
I tried on an other Mac with a more recent version of
|
very good. I actually linked a fix to this messages directly in the start of my bug report. |
Changes to the ROOT code: graf2d/gpad/src/TPad.cxx: This solves the warnings |
The PR to fix the problem is ready: #13564 |
Thanks for fixing so quickly! I had a brief look at the PR and i think you missed one EndObject() |
I'll check |
Yes you are right, with the follwing example the new mechanism I introduced shows warnings:
|
fixed |
Thanks! |
I'll commit it today. There is a few more details to check. |
The PR is now merged. Thanks for reporting this issue. |
Hi @couet, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Check duplicate issues.
Description
I played around with printing a canvas to pdf, using the EmbedFonts option or not. During EmbedFonts, where ghostcsript is called, it complaines about missing endobj in the pdf file. As far as i understand it is just a warning and the output still looks correct.
Still, no need for this warning. Why not just print the endobj?
Also: ghostscript option -dUseCIEColor is deprecated for gs > 9.11 One could remove this option in the print.
Changes to the ROOT code:
graf2d/postscript/src/TPDF.cxx:
Add
PrintStr("endobj@");
at the end of the"/Title (Page"
blocks and the"/Title (Contents"
block.graf2d/gpad/src/TPad.cxx:
remove option
-dUseCIEColor
from the gs system call.After this two changes, everything is fine for me again. No more warnings. And output looks still the same.
Reproducer
ROOT macro: (Macro.cpp)
Run with:
root -l -b -q Macro.cpp
ROOT version
ROOT version: 6.24/08
Installation method
yum
Operating system
CentOS7
Additional context
No response
The text was updated successfully, but these errors were encountered: