Print Page | Close Window

upgrade to 8 problem with renderpagetostring

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=1985
Printed Date: 30 Jan 26 at 4:12PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: upgrade to 8 problem with renderpagetostring
Posted By: wjbons
Subject: upgrade to 8 problem with renderpagetostring
Date Posted: 04 Oct 11 at 10:46AM
Hi,
I am upgrading from 7.21 to 8.11 and encounter a problem with creating images.
(I use a new license key).
 

I am using the LoadFromFile to load an existing pdf document.

The document is loaded and contains 192 pages.
Next I want to create an image from page 1 by using:

Dim Output() As Byte = PDF.RenderPageToString(96, 1, 5) 'pngThe output is empty.

The underlying function QuickPDFStringResultLength returns a size of 0???

Dim data As IntPtr = dll.QuickPDFRenderPageToString(instanceID, DPI, Page, Options)Dim size As Integer = dll.QuickPDFStringResultLength(instanceID)

Am I doing something wrong with this new version? Version 7.21 worked fine.
 
Local develop Situation:
Visual Studio 2010
Windows 7  64 bit.



Replies:
Posted By: wjbons
Date Posted: 04 Oct 11 at 12:11PM
When I change it to ansi, it works?
Is this now a bug, of do i have to check something???
 
    Public Function RenderPageToString(ByVal DPI As Integer, ByVal Page As Integer, _
        ByVal Options As Integer) As Byte()
      If (dll Is Nothing) Then
        Return New Byte(-1) {}
      Else
        Dim data As IntPtr = dll.QuickPDFRenderPageToString(instanceID, DPI, Page, Options)
        Dim size As Integer = dll.QuickPDFAnsiStringResultLength(instanceID)
        Dim result As Byte() = New Byte(size - 1) {}
        Marshal.Copy(data, result, 0, size)
        Return result
      End If
    End Function


Posted By: AndrewC
Date Posted: 05 Oct 11 at 8:16AM
You are correct.  We found this problem and corrected it in the 8.12 beta. 



Posted By: wjbons
Date Posted: 12 Oct 11 at 9:11AM
thanks.



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