# Multipage PDF - less memory consumption using png or something else

**URL:** <https://root-forum.cern.ch/t/multipage-pdf-less-memory-consumption-using-png-or-something-else/60234>\
**Category:** ROOT\
**Tags:** graphics, root\
**Created:** [July 17, 2024, 1:26pm UTC](https://root-forum.cern.ch/t/multipage-pdf-less-memory-consumption-using-png-or-something-else/60234 "2024-07-17T13:26:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rsln](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rsln](https://root-forum.cern.ch/u/rsln)\
**Post date:** [July 18, 2024, 8:55am UTC](https://root-forum.cern.ch/t/multipage-pdf-less-memory-consumption-using-png-or-something-else/60234/3 "2024-07-18T08:55:20Z")

</div>

Hi! Well, I am not exactly blocked by the issue – it’s just that memory consumption really bothers me, because at the moment I cannot predict how huge the data might be, but it seems that scalability is a ‘must have’ in my case – I would like to get plots with lots of points, but without spending too much space. Going PNG-only is not really an option for me, because I specifically need my plots to be in one PDF. I discussed an option of creating something like a big tpad with all the necessary plots and then exporting it to png, but i was advised that it’s not a desired approach.

I also tried an advice from ([Warning in \<TASImage::Paint\>: PDF not implemeted yet](https://root-forum.cern.ch/t/warning-in-tasimage-paint-pdf-not-implemeted-yet/20122)) about going to PS, but it created an even bigger file than my pdf, (something like ~350 kilobytes cummulative pngs size vs 3.2 megabytes PS file).

I also realized that it kinda depends on points – in small cases there’s no difference, but the further I go in terms of points amount, the huger PDF is.

At the moment I will be investigating for some kind of small C++ library that would allow me to fuze PNGs to PDF and see whether the idea is at all helping with size reduction.

But I am still very much looking forward to some advice, since I would love to do everything with ‘in-house’ methods of ROOT!

---

_[View the full topic](https://root-forum.cern.ch/t/multipage-pdf-less-memory-consumption-using-png-or-something-else/60234)._
