Print Page | Close Window

RenderPageToString, generates a empty image page

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2224
Printed Date: 13 Aug 25 at 5:25PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: RenderPageToString, generates a empty image page
Posted By: cmedina
Subject: RenderPageToString, generates a empty image page
Date Posted: 11 Apr 12 at 7:37PM

Hi, I need help with this problem.
When I generate an image of a page using RenderPageToString, only with some specific PDF files which were generated by scan or fax a printed document, the result image is a blank jpg with the page’s dimensions. The content of all these files is a scanned image set as page’s Background. Think the RenderPageToString method ignores the content of the background. Let me know if there is a way to configure the render to not ignore the background.

This is mi wrapper implementation:

public byte[] RenderPageToString(int DPI, int Page, int Options)

{

  if (this.dll == null)

  {

    return new byte[0];

  }

  IntPtr source = this.dll.QuickPDFRenderPageToString(this.instanceID, DPI, Page, Options);

  int length = this.dll.QuickPDFStringResultLength(this.instanceID);

  byte[] destination = new byte[length];

  Marshal.Copy(source, destination, 0, length);

  return destination;

}


I am using
C# in Visual Studio 2010
.Net Framework 4
QuickPDFDLL0718.dll




Replies:
Posted By: AndrewC
Date Posted: 13 Apr 12 at 12:10PM
You should try upgrading the to 7.26 version as it includes lots of bug fixes and enhancements.  It is a free upgrade for all 7.xx users and can be downloaded from

http://www.quickpdflibrary.com/downloads/binaries/qp/oldversions/0726/quick_pdf_library726.exe

If this doesn't work then you would need to send the PDF files to the official QPL support.  There are many PDF files that are malformed and contain syntax errors.  These PDF's do not follow the official PDF specification.

It is most likely these PDF files are molformed.  It is possible we may be able to add a workaround to QPL to get it to load the files correctly.  

Andrew.


Posted By: cmedina
Date Posted: 13 Apr 12 at 4:17PM
Thank you, I updated to 7.26 and worked perfectly



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk