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!
RenderDocumentoFile Issue - ANY help appreciated! |
Post Reply |
Author | |
kksoft
Beginner Joined: 02 Jun 12 Location: California Status: Offline Points: 6 |
Post Options
Thanks(0)
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 |
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
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: 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.
Edited by Rowan - 18 Nov 13 at 4:00AM |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
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. |
|
kksoft
Beginner Joined: 02 Jun 12 Location: California Status: Offline Points: 6 |
Post Options
Thanks(0)
|
>>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. |
|
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