Hi. I noticed that qvm-convert-pdf crashes exactly on the 50th page no matter what pdf file it is but with increased image quality in template. I tested 4 different pdf files which had above 50 pages (55-215) and that tool is crashing with Killed message exactly on the 50th page. With pdf files that have less than 50 pages, it is converting correctly. What I changed before using qvm-convert-pdf:
created different fedora template for pdfs.
created different disposable template for pdfs.
increased image quality by adding "-r", "500", in 148 line (create_irep()) of server.py here:/usr/lib/python3.12/site-packages/qubespdfconverter in fedora template for pdfs.
changed default disposable template in a qube in which I have that pdf files to that created for pdfs which is important because qvm-convert-pdf runs disposable vm to convert pdf. Also what is important - it is crashing when I set dpi to >= 500. Itās not crashing with Killed message when I set it to 300-400 for example. Also I monitored RAM and CPU usage and it was fine so it is not caused by some out of memory-like errors. Strange thing is that it is crashing exactly on 50th page.
I cannot check the output PDF size since there are no output PDFs. It is being killed during sanitizing process so it is not completed and I couldnāt find any directory where pdftocairo works in disp VM (in order to find some incompleted PDF file). Input PDFs page size: 595 x 842 - A4 or 612 x 792 - letter, but I donāt think that matters as I checked it on few different PDFs with different page sizes and if PDF has > 50 pages, it is being Killed at 50th page.
Can you post the link or upload the PDF that is causing this issue for you?
Iāve tried converting the large PDF that was linked as an example in the github issue and it worked for me.
Did you convert it with increased image quality in /usr/lib/python3.12/site-packages/qubespdfconverter/server.py? If I convert it without increased image quality (150 dpi), it works.
Yes, it works for me with 500 PPI. At least I didnāt have the error while converting the PDF file up to page 65.
Maybe the issue is related to the memory balancing because Iāve noticed that xen-balloon process was using a lot of CPU resources.
Maybe there is some race condition when you donāt have enough free memory for the memory balancer to assign to your disposable qube (or the memory assignment is not fast enough) and the conversion operation fails because of this.
Try to disable the memory balancing and set the initial memory to 2 GB in the disposable template that you use for the PDF conversion for a test.
Itās not working with 500 PPI even with 2.5 GB assigned to qube from which I convert and to qube where itās converting. But I noticed that there was an update and now default is 300 PPI and it works with that value even without disabled memory balancing. Iām pretty satisfied with 300 PPI. Maybe I just have too low memory for that, idk.
Glad that you liked it. There is also the new --resolution for qvm-convert-pdf.
The limit is not memory. It is /tmp size. You may try to increase it to something over the default 1GB and try again.
p.s. /tmp is used to temporary store uncompressed PDF pages during conversion. It is also used for temporary storage of uncompressed images during qvm-convert-image operation.