PDF vs. PNG figure: why does figure load so much faster even if file sizes are the same?Problem with positioning a figure environment inside resizeboxChoosing whether to include PDF or PNG in PDFLaTeXInserting .pdf created in Visio to LaTeX without whitespacePDF-format causes figure to be moved to end of chapterReplicating figure in another document with same numberingWhy do my PDF figures in PDFTeX look bad in print?preserving pixel resolution when converting to PDFMatplotlib PDF figures blurry when printedIncluded PDF vector is missing objectsThin Lines from PDF Figure in Latex get thicker when exported to final PDF

How can I deal with uncomfortable silence from my partner?

Does putting salt first make it easier for attacker to bruteforce the hash?

Why am I Seeing A Weird "Notch" on the Data Line For Some Logical 1s?

Why not invest in precious metals?

Why am I getting a strange double quote (“) in Open Office instead of the ordinary one (")?

What are neighboring ports?

What are some really overused phrases in French that are common nowadays?

Printing Pascal’s triangle for n number of rows in Python

Is it possible to have a wealthy country without a middle class?

If I leave the US through an airport, do I have to return through the same airport?

Longest bridge/tunnel that can be cycled over/through?

Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?

Why did my credit score plummet after a balance transfer?

What is exactly Avijja -- and how to uproot it?

Does Assassinate grant two attacks?

How can I make 12 tone and atonal melodies sound interesting?

Next date with distinct digits

Increase speed altering column on large table to NON NULL

With Ubuntu 18.04, how can I have a hot corner that locks the computer?

color rows on table (Tabu package)

Can a human be transformed into a Mind Flayer?

Which is the better way to call a method that is only available to one class that implements an interface but not the other one?

60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?



PDF vs. PNG figure: why does figure load so much faster even if file sizes are the same?


Problem with positioning a figure environment inside resizeboxChoosing whether to include PDF or PNG in PDFLaTeXInserting .pdf created in Visio to LaTeX without whitespacePDF-format causes figure to be moved to end of chapterReplicating figure in another document with same numberingWhy do my PDF figures in PDFTeX look bad in print?preserving pixel resolution when converting to PDFMatplotlib PDF figures blurry when printedIncluded PDF vector is missing objectsThin Lines from PDF Figure in Latex get thicker when exported to final PDF













3















I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.



Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.



Why is it that the smaller PDF figure takes so much longer to load?










share|improve this question




























    3















    I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.



    Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.



    Why is it that the smaller PDF figure takes so much longer to load?










    share|improve this question


























      3












      3








      3








      I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.



      Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.



      Why is it that the smaller PDF figure takes so much longer to load?










      share|improve this question
















      I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.



      Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.



      Why is it that the smaller PDF figure takes so much longer to load?







      floats pdf png






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 hours ago







      NeutronStar

















      asked 8 hours ago









      NeutronStarNeutronStar

      222139




      222139




















          1 Answer
          1






          active

          oldest

          votes


















          7














          This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).



          a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.



          A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.



          In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.






          share|improve this answer




















          • 2





            Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

            – TeXnician
            6 hours ago











          • @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

            – TeXnician
            2 hours ago











          • @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

            – KJO
            1 hour ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494691%2fpdf-vs-png-figure-why-does-figure-load-so-much-faster-even-if-file-sizes-are-t%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          7














          This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).



          a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.



          A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.



          In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.






          share|improve this answer




















          • 2





            Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

            – TeXnician
            6 hours ago











          • @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

            – TeXnician
            2 hours ago











          • @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

            – KJO
            1 hour ago















          7














          This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).



          a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.



          A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.



          In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.






          share|improve this answer




















          • 2





            Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

            – TeXnician
            6 hours ago











          • @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

            – TeXnician
            2 hours ago











          • @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

            – KJO
            1 hour ago













          7












          7








          7







          This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).



          a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.



          A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.



          In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.






          share|improve this answer















          This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).



          a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.



          A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.



          In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 7 hours ago

























          answered 8 hours ago









          ArTourterArTourter

          11.4k43853




          11.4k43853







          • 2





            Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

            – TeXnician
            6 hours ago











          • @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

            – TeXnician
            2 hours ago











          • @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

            – KJO
            1 hour ago












          • 2





            Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

            – TeXnician
            6 hours ago











          • @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

            – TeXnician
            2 hours ago











          • @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

            – KJO
            1 hour ago







          2




          2





          Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

          – TeXnician
          6 hours ago





          Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.

          – TeXnician
          6 hours ago













          @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

          – TeXnician
          2 hours ago





          @KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.

          – TeXnician
          2 hours ago













          @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

          – KJO
          1 hour ago





          @TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)

          – KJO
          1 hour ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494691%2fpdf-vs-png-figure-why-does-figure-load-so-much-faster-even-if-file-sizes-are-t%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480