Created attachment 133883 [details] partical code c++ Windows 8.1 32 bit application, Cairo 1.15.2 - I'm trying to create a PDF with a a large number of big images. The overall PDF size in inches is 150" x 60" and I have PNG images that are 4k x 6k x 32 bit. The images are from from files as you can see in the attached code I build a surface with the image and add it to the context. For each image I can see the memory usage going up until I hit 1gb and then things start to fail (out of memory). I using the following to check usage: PROCESS_MEMORY_COUNTERS_EX pmc; pmc.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX); GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS *)&pmc, sizeof(pmc)); pmc.WorkingSetSize The attached code is c# but I have a wrapper to the c++ library. So my question is does cairo hold on to each surface even though I destroyed it when I'm done? Or does cairo hold the info until the end of the process when the PDF is actually written to disk? Just trying to figure out how to move forward on this memory issue. Thanks
Created attachment 133891 [details] Low res image of marker This is a low res image of what I'm trying to export as PDF. The PDF will NOT contain the text you see on each piece you see in the image.
I have a PDF just before the "no memory" error, basically forcing completion via debug but it's 141mb and can not be attached
The images for each page are held until cairo_show_page is called. Then they a freed after the page is written to disk.
Also, if you are creating huge PDFs you are really better off using a 64-bit version.
Ok, I here you on the 64 bit solution. For now what I did was create a multi page PDF with each "piece" on a page in the proper location. Do you know of any way to "flatten" all pages of a PDF into one page? Thanks T
Problem is due to the memory constraints of using a 32-bit build.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.