Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jun 29, 2016 1:15 pm

Hello,
I have an issue with converting pdf to png image. My pdf contains barcode, that's why I need the best possible quality.
My code:

Code: Select all
Random rand = new Random();
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
           
doc.LoadFromFile(@"C:\temp\paczkaWRuchu.pdf");

Image emf = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Bitmap, 300, 300);


emf.Save(@"C:\temp\paczkaWRuchu" + rand.Next() + ".bmp", ImageFormat.Png);


I tried different dpix/dpiy settings, but the lines in barcode are always blurry.
When I tried using online converter (pdf2jpg) letters in my pdf were in worse quality, but barcode was crystal clear. How can I achieve that with Spire.Pdf? I attached my pdf file and output png file.

dessambe
 
Posts: 1
Joined: Wed Jun 29, 2016 12:33 pm

Thu Jun 30, 2016 3:06 am

Dear dessambe,

Thanks for your inquiry.
I have noticed your issue and posted it to our Dev team. We will inform you once there is any progress.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed Jul 06, 2022 1:50 am

Hello,

Thanks for your patient waiting.

Glad to inform you that we just released Spire.Pdf Pack(Hot Fix) Version:8.7.2 which fixes your issue.

Please download the fix version from the following links to test.
Website link:
https://www.e-iceblue.com/Download/download-pdf-for-net-now.html

Nuget link:
https://www.nuget.org/packages/Spire.PDF/8.7.2

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2767
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF