-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Ipe 7.2.24 produces significantly larger files than 7.1.7 #412
Comments
Between 7.1.7 and 7.2.24, Ipe switched to a much more general method for including the PDF resources from the pdflatex output. And for some reason, pdflatex already produces a rather large file (278kB, larger then the Ipe 7.1.7 version of the entire document). How do you include the pages in your beamer document? pdflatex should be smart enough that when you include various pages using |
Thank you for your reply. I do use Steps to reproduce using this zip: https://drive.google.com/file/d/1XT9WGbGXYAelK3188hV7Mk1k0kS--yW9/view?usp=sharing
Clean up the files LaTeX generated. Now, open
|
Would it be possible to have Ipe execute that ghostscript command¹ after building the document, but before embedding its own data? Then the "more general method for including the PDF resources from the pdflatex output" can be kept while still producing output files with a more reasonable size. ¹ |
I was convinced that pdflatex is smart enough to not duplicate resource when you include multiple pages from the same document - the reason being, that I wrote that code for pdflatex in 2001. It turns out that this does not work anymore, at least not when used the standard way through However, there is a simple trick: If you modify your file
then the duplication of resources does not happen. You can easily check that the result has each font only once. This doesn't change that Running ghostscript basically parses the entire document and rendering it into a PDF writer. In this case, that eliminates the overhead of the PDF XForms - but it's not always the appropriate thing to do (in other cases you would duplicate the contents of XForms, leading to files that are actually larger), and I'm not sure if it can actually handle documents with links and named objects. |
Thank you for looking into this!
I can confirm that this reduces the file size of my "production" files (not test file) from 70MB to 8MB. The GhostScript command from above still brings it down to about 3MB, so I will probably leave that one in the makefile. (Also, I don't think my colleagues will remember to add the
That sounds awesome! Thank you! |
I have some pdf files that were created with Ipe
7.1.7
. When I open these files in Ipe7.2.24
and save them without modifications, their file size gets significantly larger.This file(removed, see other file below), for example, grows by a factor of more than 5: from 115 KB to 630 KB. The behavior is the same on Arch Linux and MacOS.When then including that file in a LaTeX beamer presentation, the increased size becomes a rather big problem. I noticed this because my presentation suddenly went from 3 MB to 70 MB - just by saving one Ipe figure (different slides of the beamer presentation show different pdf pages of the Ipe figure).
My workaround is to run ghostscript on the presentation after compiling:
gs -q -sDEVICE=pdfwrite -o presentation-size-fix.pdf presentation.pdf
. With that 70 MB file, running the ghostscript command takes about 1-2 minutes (compared to about 2 seconds with the old Ipe image), making it rather hard to work with the presentation.Do you have an idea why saving the Ipe file with a more recent version increases the file size that much?
The text was updated successfully, but these errors were encountered: