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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Unable to convert to images.
  FAQ FAQ  Forum Search   Register Register  Login Login

Unable to convert to images.

 Post Reply Post Reply
Author
Message
Ludwig View Drop Down
Team Player
Team Player


Joined: 07 May 15
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ludwig Quote  Post ReplyReply Direct Link To This Post Topic: Unable to convert to images.
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Apr 16 at 7:37PM
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

Back to Top
Ludwig View Drop Down
Team Player
Team Player


Joined: 07 May 15
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ludwig Quote  Post ReplyReply Direct Link To This Post Posted: 06 Apr 16 at 1:57AM
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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 06 Apr 16 at 6:49PM
Never the less you could try "my" suggestion with RenderDocumentToFile ;-)

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store