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!
![]() |
Issue with RenderPageToFile |
Post Reply
|
| Author | |
chadnewman
Beginner
Joined: 09 Oct 15 Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: Issue with RenderPageToFilePosted: 09 Oct 15 at 5:11PM |
|
I'm using RenderPagetoFile to convert a PDF to a Tiff image. The method returns a success, but only creates a 1K Tiff that is not usable. Below is a link for the PDF I'm trying to use.
https://onedrive.live.com/redir?resid=D00E601EE3131C52!25556&authkey=!AChRq_7PfDCm5Jk&ithint=file%2cpdf Here is the code I'm using in Visual FoxPro dplloadfromfile(ninstanceid,cimportname,"") nfilehandle = dpldaopenfile(ninstanceid,cimportname,"") npagecount = dpldagetpagecount(ninstanceid,nfilehandle) nrendersuccess = dplrenderdocumenttofile(ninstanceid,300,1,npagecount,7,tcfilename) Thanks, Chad Newman |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Oct 15 at 7:59PM |
|
Hi Chad,
it works fine for me. I'm wondering why you want to use 300 dpi? The original embedded image has 7198 x 4790 pixels. With the (for pdf normal) 72 dpi you're getting a 2592 x 1725 pixels tiff-file with 1.13 mb. With 300 dpi you're getting a 10798 x 7185 pixels tiff-file with 12.3 mb. So you should try something between these two dpi-values. Here is my code: targetfile := target + ExtractFileName(Edit1.Text) + '-72.tif'; QP.RenderDocumentToFile(72, 1, QP.PageCount, 7, targetfile); targetfile := target + ExtractFileName(Edit1.Text) + '-300.tif'; QP.RenderDocumentToFile(300, 1, QP.PageCount, 7, targetfile); If you want to get the best quality image you should try other functions. Plans like yours are embedded as original image-files into pdf-documents. So you should grab the images out of the pdf-document. You can use for this job (in the same order): QP.SelectPage() QP.GetPageImageList() QP.GetImageListCount() QP.GetImageListItemIntProperty() // <-- to get the original filetype QP.SaveImageListItemDataToFile() Cheers and welcome here, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
chadnewman
Beginner
Joined: 09 Oct 15 Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 Oct 15 at 2:55PM |
|
Ingo,
Thank you very much for your reply. I will review what you have posted and give it a try. |
|
![]() |
|
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