Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Quality of rendered PDF is not good |
Post Reply ![]() |
Author | |
hansjoergp ![]() Beginner ![]() Joined: 11 Sep 13 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 11 Sep 13 at 9:16AM |
Hello,
we use the quickpdf library to display pdfs on the screen (.net application). For some pdfs (they are coming from a scanner) the quality is really bad (with acrobat Reader the PDF is okay). Which possibility we have to make the quality better? We use this code: Bitmap DrawPdfPage(int page, int width, int height) { var pw = pdf.PageWidth() / 72.0; var ph = pdf.PageHeight() / 72.0; int renderDpi = 72; renderDpi = (int)Math.Min(width / pw, height / ph); // fit both //renderDpi = (int)(width / pw); //renderDpi = (int)(height / ph); width = (int)(renderDpi * pw); height = (int)(renderDpi * ph); Bitmap bitmap = new Bitmap(width, height); if (page > 0 && page <= pdf.PageCount()) { using (var g = Graphics.FromImage(bitmap)) { IntPtr dc = g.GetHdc(); pdf.RenderPageToDC(renderDpi, page, dc); g.ReleaseHdc(dc); } } return bitmap; } Best regards Hansjoerg
|
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Hansjoerg,
Can you try adding the following line to you program somewhere after QP.UnlockKey. QP.SetGDIPlusOptions(3, 1); // Turn on image smoothing Andrew. |
|
![]() |
|
hansjoergp ![]() Beginner ![]() Joined: 11 Sep 13 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Thanks it works
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store