Print Page | Close Window

Text too Faint on Render

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2828
Printed Date: 28 Sep 24 at 11:05PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Text too Faint on Render
Posted By: oberon232
Subject: Text too Faint on Render
Date Posted: 13 Feb 14 at 11:07PM
When I open a file in Acrobat Viewer full screen, the text is bold and legible, but when I render the image onto a full screen (same size) DC, the text is very light and faint. 
I have tried adjusting the SetGDIPlusOptions, but have not found any that make the page look any closer to the Adobe view.
Does anyone have experience with this problem? 



Replies:
Posted By: AndrewC
Date Posted: 14 Feb 14 at 11:45PM
Oberon,

This is most likely related to the PDF file itself. We would need to see the PDF file in order to make further comments.  You can either post a download link here or can create a support case by emailing support@debenu.com

The upcoming Debenu Quick PDF Library 10.13 version will include an improved rendering engine and may improve the rendering results.

Andrew.


Posted By: oberon232
Date Posted: 17 Feb 14 at 2:24PM
One of the files I have posted for review.

http://96.237.50.19/Andrew/1128618277.pdf


Posted By: AndrewC
Date Posted: 18 Feb 14 at 12:26PM

Oberon,

Have you tried using 

            QP.SetGDIPlusOptions(3, 1);     // Turn on image smoothing

Do we assume you are using the RenderPageToDC function ?  Are you rendering to a local DC or to a Remote Desktop or terminal server DC ?

Andrew.



Posted By: oberon232
Date Posted: 21 Feb 14 at 3:56PM
I am rendering to a bitmap in a memory stream, and then sending that as the source of a picture box. I originally did the methodology of rending to DC, but the picture box allows me to scroll and zoom simply by changing the dimension of the picture box in the form.

I have tried QP.SetGDIPlusOptions(3, 1);  


Posted By: AndrewC
Date Posted: 22 Feb 14 at 4:52AM
Oberon,

What DPI are you using to render to the Bitmap ?  Can you post a sample screen shot of what is currently being output ?

I use RenderPageToFile and 100, 200 and 300 dpi with  QP.SetGDIPlusOptions(3, 1); and do not see any real quality issues with your PDF file.

RenderPageToDC will produce better results as is use the native DPI and pixels available.  Converting it to a bitmap will lose some definition as the image then needs to be rescaled to fit in the picturebox.  So it is not a fair comparison to compare Acrobat to a scaled PictureBox image especially if the PictureBox is doing anything but 1:1 scaling.

Andrew.


Posted By: oberon232
Date Posted: 24 Feb 14 at 3:38PM
Here's the code I use

    Private Sub ShowPageInControl(ByRef ctrl As Control)
        Dim bmpData() As Byte
        Dim ms As IO.MemoryStream
        Dim bmp As Bitmap


        QP.SetGDIPlusOptions(3, 1)

        bmpData = DirectCast(QP.RenderPageToVariant(200, CurrentPage, 0), Byte())
        ms = New IO.MemoryStream(bmpData)
        bmp = New Bitmap(ms)
        bmp.Save(ms, ImageFormat.Png)

        PictureBox1.Image = bmp
        ms.Dispose()
    End Sub

And here is the screen capture http://dblinc.no-ip.com/andrew/screenCap.jpg


Posted By: AndyD
Date Posted: 24 Feb 14 at 6:08PM
Oberon, a quick question out of curiosity really, why are you rendering this anyway and not leaving it as a pdf?
 
 


Posted By: Ingo
Date Posted: 25 Feb 14 at 7:49AM
Hi Andy,
 
he wants to build his own simple pdf-reader ;-)
 
Cheers, Ingo


-------------
Cheers,
Ingo



Posted By: AndrewC
Date Posted: 09 Mar 14 at 1:56PM
Oberon,

There is a 2nd conversion going on when you scale the image inside the PictureBox which would not be helping things.  

You would get better results using RenderPageToDC as there would be less scaling operations involved or to use the new Debenu ActiveX renderer released alongside version 10.13 of Debenu PDF Library.  

http://www.debenu.com/products/development/debenu-pdf-viewer-sdk/

The other issues are the fact that Acrobat has a special function to enhance thin lines which is not easy to replicate when using GDI+ or our new rendering engine.  Acrobat has spent millions of dollars developing, fine tuning and optimising their rendering engine.  

Andrew.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk