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 - png image rendred was empty
  FAQ FAQ  Forum Search   Register Register  Login Login

png image rendred was empty

 Post Reply Post Reply
Author
Message
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Topic: png image rendred was empty
    Posted: 13 Feb 17 at 1:19PM
Hi,
I'm using QuickPDFNet1212x64 library and when i call DARenderPageToFile method with the following params 1476395009, 1476395011, 5, 300, "C:\PageRender_0001.png" i got an empty image
despite that, the returned result value is 1 => 
1int32The page was rendered correctly and the image file was saved to disk

The pdf and generated image is located here: http://www.4shared.com/folder/6PUqQHD3/QuickPdf.html



Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 17 at 2:12PM
You should show your actual code to enable people to see how you obtained the filehandle and pageref parameters: the actual values are of no help.  Then I expect someone will be able to suggest something to try.
Back to Top
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 17 at 2:46PM
I using this method to get filehandle 
 QuickPDFNet.PDFLibrary.Instance.DAOpenFileReadOnly( pdfFileFullPath, password );
and for the other parmameter 
pagehandle

 int pagehandle = QuickPDFNet.PDFLibrary.Instance.DAFindPage( fileHandle, pageNumber );

int result = QuickPDFNet.PDFLibrary.Instance.DARenderPageToFile
( fileHandle
, pagehandle
, GetPageRenderQuickPDFImageFormat( renderImageFormat )
, dpi
, imageFile.FullName
);

switch( result )
{
case 0: //Wrong file handle or page handle
{
throw new ArgumentException( "Invalid page number or pdf file specified !" );
}
case 1:
{
return imageFile;
}
case 2: //Cannot save to disk
{
throw new IOException( string.Concat( "Cannot save the page image rendering to ", pdfPageRenderImageFile, " !" ) );
}
default : 
{
throw new Exception( string.Concat( "Unknow quickpdf return code : ", result ) );
}
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: 13 Feb 17 at 7:32PM
png and pdf-page are looking the same for me (using Chrome)?

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 17 at 7:48AM
@Ingo: Yes they look like using chrome browser. You can download files as zip and you will see the difference
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 (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 15 Feb 17 at 7:27PM
The strange download site is not particularly trusting.
I don't wanna have few unknown things on my harddisk after using this site :(

Cheers,
Ingo

Back to Top
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 17 at 9:01AM
think you Ingo
I shared the pdf and the generated image in google drive
https://drive.google.com/open?id=0B7zZhKfGfiFNWnBUa3RYTENybms

Back to Top
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 17 at 9:39AM
Originally posted by Edysoft Edysoft wrote:

thank you Ingo
I shared the pdf and the generated image in google drive
https://drive.google.com/open?id=0B7zZhKfGfiFNWnBUa3RYTENybms



I even tested with the new version and I had the same problem
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 17 at 11:19AM
I successfully converted this PDF file to image using our application, but (a) we convert to BMP, and (b) we no longer use the DA functions (which had some rendering issues with PDFium in the latest build, though we no longer use the Debenu PDFium DLL), and (c) we use Delphi, not .Net.  But this confirms to me that there is nothing unusual or 'difficult' about your PDF file. I also tried to convert to PNG using Debenu PDF Tools Pro v3, but this was a 2014 version so based on a much earlier QPDF library: it crashed, but that has happened before.

I recommend trying the non-DA API functions to see if that helps.  As I said, there are some differences in rendering between the two function sets in the latest release.  If it works without DA but the DA functions are essential for you, then raise a support issue.
Back to Top
Edysoft View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 17
Location: France
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Edysoft Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 17 at 1:28PM
I have already used another method than "DARenderPageToFile"(RenderDocumentToFile) but it does not work because it generate an empty image
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: 20 Feb 17 at 6:27PM
Mmmmmh...
In your code snippet i can't find the unlock-function?

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