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!
![]() |
Unable to convert to images. |
Post Reply ![]() |
Author | |
Ludwig ![]() Team Player ![]() Joined: 07 May 15 Location: India Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() Posted: 05 Apr 16 at 7:05AM |
I am using the licensed Android Version for Debenu Quick Pdf (12.12).
I am converting the Pages of a PDF file into jpeg images using the following code: int fileHandle = mDQPL.DAOpenFile("file_path", password); int pageCount = mDQPL.DAGetPageCount(fileHandle); for (int pageIndex = 1; pageIndex <= pageCount; pageIndex++) { int pageRef = mDQPL.DAFindPage(fileHandle, pageIndex); mDQPL.DARenderPageToFile(fileHandle, pageRef, DEBENU_JPEG_OUTPUT, DEBENU_IMAGE_DPI, "image_file_path"); } This code is working for most files, however there are some for which it generated blank jpeg images for the PDF pages. For example in the following pdf: https://drive.google.com/file/d/0B_6Z82hoBteTMzhCNVlqa0xqSjQ/view?usp=sharing when I attempted to convert it into image using the above code, all I got is:(For its first Page) https://drive.google.com/drive/folders/0B_6Z82hoBteTVDVUMUxUcHNxMk0 Please note: when i used the windows version of the library, it managed to successfully convert the PDF into images.
How can i handle this? Edited by Ludwig - 05 Apr 16 at 7:08AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Ludwig,
i can only test with the windows version. My app for rendering is made with 10.14 and it works fine with your files. The android version of the library comes last - so you can post your problem on the official support page from Debenu (if it's a real error here isn't the right place 'cause nobody here in the USER-forum can change it). But anyway leave this function and try another one for rendering. Below a snippet from my code - perhaps this function works better for you, too: // . . . lv_pwidth := QP.PageWidth; lv_pheight := QP.PageHeight; if ( lv_pwidth > lv_pheight ) then lv_pmax := lv_pwidth else lv_pmax := lv_pheight; lv_dpi := Round(( lv_pmax * 72 ) / 692); If x_suchen = '' Then begin ProgressBar1.Position := 60; ProgressBar1.Repaint; end; Save_Cursor := Screen.Cursor; Screen.Cursor := crHourglass; { Show hourglass cursor } targetfile := target + ExtractFileName(Edit1.Text) + '.jpg'; QP.RenderDocumentToFile(lv_dpi, 1, QP.PageCount, 1, targetfile); // . . . |
|
Cheers,
Ingo |
|
![]() |
|
Ludwig ![]() Team Player ![]() Joined: 07 May 15 Location: India Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() |
When i used the files with a Windows version of the Debenu Library. It did work fine. The problem appears only with the Android Version. I will post the problem on the support page for Debenu.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Never the less you could try "my" suggestion with RenderDocumentToFile ;-)
|
|
Cheers,
Ingo |
|
![]() |
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