Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Slow conversion for some files #44

Closed
mmettey opened this issue Jan 17, 2025 · 1 comment
Closed

Slow conversion for some files #44

mmettey opened this issue Jan 17, 2025 · 1 comment

Comments

@mmettey
Copy link

mmettey commented Jan 17, 2025

Hi,

I've found some performance issue when converting a specific file today.
It took about 300 seconds to convert this one page PDF to SVG, using CLI :

page5.pdf

This one is part of a 124 pages PDF, and every page of this full document is converted slowly, but this page is the slowest one.
I tested with pdf2svg library, and for the same file it takes 2 seconds.
Is there anything in that PDF file that is increasing processing time in pdftosvg.net ?

I tried to optimize the document with Adobe before conversion, but it doesn't help. The only thing that helps is to rewrite the PDF file with Ghostscript, but I'd like to avoid this.

Thanks in advance for your help !

@dmester
Copy link
Owner

dmester commented Jan 18, 2025

Thanks for reporting this issue. The performance has been improved in version 1.6.0.

The PDF format supports many types of gradients, where some of them are not supported in SVG. For those types, PdfToSvg.NET will render them as raster graphics. In this case, the raster graphics were rendered at a too high resolution for how they were used. Version 1.6.0 will render them at a lower resolution where appropriate.

@dmester dmester closed this as completed Jan 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants