Print Page | Close Window

RenderDocumentoFile Issue - ANY help appreciated!

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=2784
Printed Date: 20 Apr 24 at 6:16AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: RenderDocumentoFile Issue - ANY help appreciated!
Posted By: kksoft
Subject: RenderDocumentoFile Issue - ANY help appreciated!
Date Posted: 16 Nov 13 at 10:22PM
In VB6 I am creating a JPG from a PDF that exists. My problem is that the end-result JPG has huge width and height ( like 44 inches) with 72 DPI, even though I set it to 300 DPI and set the page size to U.S. Photo size 8 x 10 inches. IOW, if you reduce the size of the outputted JPG to an 8x10 photo, it is fine. Its producing an large version of itself.... :-(

If I import the created JPG into a paint program such as Corel I can reset the dpi and dimensions and it works fine with no ooss of quality, but I cannot expect my end-users to do that.

Is what I want possible from within  QuickPDF?? ANY help much appreciated.

Here's the code that I am using:

    ClassName = "QuickPDFAX0815.PDFLibrary"
    LicenseKey = "xxxxxx" 'SET YOUR LICENSE KEY HERE...
    'FileName = "c:\hello-world.pdf"
   
    Dim QP As QuickPDFAX0815.PDFLibrary
    Dim result
   
    Set QP = CreateObject(ClassName)
    Call QP.UnlockKey(LicenseKey)
   
    QP.LoadFromFile xfilename, "xxx"
 
    QP.SetPageDimensions 576, 720    ' 8 x 10 inches
 
    JPGName$ = Left$(xfilename, (Len(xfilename) - 4)) & ".jpg"
   
    iNumPages = QP.PageCount()
    QP.RenderDocumentToFile 300, 0, iNumPages, 1, JPGName$
   
    QP.RemoveDocument (QP.SelectedDocument)

### end of code

Any Help much appreciated!

Ken



Replies:
Posted By: Rowan
Date Posted: 18 Nov 13 at 4:00AM
Hi Ken,

It looks like you are using version 8 of Debenu Quick PDF Library. We added support for storing the rendered DPI value in the JPEG in a later version our PDF SDK. I recommend download the latest version from the website and trying with the new version:

http://www.debenu.com/products/development/debenu-pdf-library/" rel="nofollow - http://www.debenu.com/products/development/debenu-pdf-library/

Also, calling SetPageDimensions doesn't resize the content of the page, it just updates the /MediaBox entry for the page and as a result will only affect content subsequently drawn onto the page.

Cheers,
- Rowan.


Posted By: AndrewC
Date Posted: 18 Nov 13 at 7:59AM
Ken,

After some checking it seems that RenderPageToFile with a JPEG was corrected in QPL 8.16 but the RenderDocumentToFile function was not fixed.

So the solution is to upgrade to 8.16 (free upgrade from 8.15) and then use a simple loop to iterate through the pages and calling QP.RenderPageToFile.

Andrew.



Posted By: kksoft
Date Posted: 18 Nov 13 at 1:52PM
>>So the solution is to upgrade to 8.16 (free upgrade from 8.15) and then use a simple loop to iterate through the pages and calling QP.RenderPageToFile.

That actually worked! I am so happy. I never thought to use render to page instead of to document. Can you tell me if RenderDocumentToFile is now fixed in a new version?

Your help has solved my insidious problem, and I thank you. Tongue



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