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

Background for black and white chart

Are soroban (Japanese abacus) classes worth doing?

How to remove multiple elements from Set/Map AND knowing which ones were removed?

Why can't we feel the Earth's revolution?

Must a CPU have a GPU if the motherboard provides a display port (when there isn't any separate video card)?

How do credit card companies know what type of business I'm paying for?

How to address players struggling with simple controls?

Co-worker is now managing my team. Does this mean that I'm being demoted?

Is it possible to install Firefox on Ubuntu with no desktop enviroment?

Is it a good security practice to force employees hide their employer to avoid being targeted?

Can Dive Down protect a creature against Pacifism?

What is the context for Napoleon's quote "[the Austrians] did not know the value of five minutes"?

What is the difference between state-based effects and effects on the stack?

Do legislators hold the right of legislative initiative?

I sent an angry e-mail to my interviewers about a conflict at my home institution. Could this affect my application?

Is fission/fusion to iron the most efficient way to convert mass to energy?

Cant bend fingertip when finger is straight

Are there any rules for identifying what spell an opponent is casting?

Nth term of Van Eck Sequence

Can an opamp have its own voltage regulator?

Manager wants to hire me; HR does not. How to proceed?

How long would it take for sucrose to undergo hydrolysis in boiling water?

Is there a term for someone whose preferred policies are a mix of Left and Right?

What things do I only get a limited opportunity to take photos of?



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






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















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






























    4















    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


























      4












      4








      4








      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 Jun 7 at 15:50







      NeutronStar

















      asked Jun 7 at 15:23









      NeutronStarNeutronStar

      227139




      227139




















          1 Answer
          1






          active

          oldest

          votes


















          8














          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




















          • 3





            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
            Jun 7 at 17:05











          • @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
            Jun 7 at 21:52











          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









          8














          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




















          • 3





            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
            Jun 7 at 17:05











          • @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
            Jun 7 at 21:52















          8














          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




















          • 3





            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
            Jun 7 at 17:05











          • @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
            Jun 7 at 21:52













          8












          8








          8







          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 Jun 7 at 16:30

























          answered Jun 7 at 15:52









          ArTourterArTourter

          11.4k43853




          11.4k43853







          • 3





            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
            Jun 7 at 17:05











          • @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
            Jun 7 at 21:52












          • 3





            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
            Jun 7 at 17:05











          • @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
            Jun 7 at 21:52







          3




          3





          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
          Jun 7 at 17:05





          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
          Jun 7 at 17:05













          @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
          Jun 7 at 21:52





          @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
          Jun 7 at 21:52

















          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

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form