Print Page | Close Window

How to get pointer to data in memory

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=2581
Printed Date: 01 Feb 26 at 8:21PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to get pointer to data in memory
Posted By: raphaelverdier
Subject: How to get pointer to data in memory
Date Posted: 28 Mar 13 at 10:47AM
For our software we need a new component for opening pdf.
We want to know if it possible with quickpdf to open pdf and :
If the pdf has only an image get the pointer to data in memory
If the pdf is a vector transform it to an image and get the pointer to data in memory

How to do this ?

thanks for your help
We use the latest version of quickpdf



Replies:
Posted By: tfrost
Date Posted: 28 Mar 13 at 5:23PM
Much safer to let the library extract the image for you, using one of the DAGetImageDataTo... or SaveImageTo... functions.






Posted By: raphaelverdier
Date Posted: 01 Jul 13 at 4:12PM
thanks for your answer, I found the solution by using the function RenderPageToString.
after I convert the String to Hglobal and I can load the image with our SDK.

Now I need to get the dpi used in the pdf or image for the function RenderPageToString.
I try the function ImageHorizontalResolution but I allways get the value 0

Do you know how to get the dpi resolution ?

for example :
                    int filehandle  =debenudll->LoadFromFile(strFileName, szPWD);
                    int numPages = debenudll->PageCount();
                    int numImages = debenudll->FindImages();
                    for (int i = 1; i <= numPages; i++)
                    {
                        for (int j = 1; j <= numImages; j++)
                        {
                            int idxImage = debenudll->GetImageID(i);
                            int nTest =debenudll->SelectImage(idxImage);
                            int nRes = debenudll->ImageHorizontalResolution();
                            nRes = debenudll->ImageHeight();//this function works

                        }
                  }


Posted By: raphaelverdier
Date Posted: 01 Jul 13 at 4:19PM
Originally posted by raphaelverdier raphaelverdier wrote:

thanks for your answer, I found the solution by using the function RenderPageToString.
after I convert the String to Hglobal and I can load the image with our SDK.

Now I need to get the dpi used in the pdf or image for the function RenderPageToString.
I try the function ImageHorizontalResolution but I allways get the value 0

Do you know how to get the dpi resolution ?

for example :
                    int filehandle  =debenudll->LoadFromFile(strFileName, szPWD);
                    int numPages = debenudll->PageCount();
                    int numImages = debenudll->FindImages();
                    for (int i = 1; i <= numPages; i++)
                    {
                        for (int j = 1; j <= numImages; j++)
                        {
                            int idxImage = debenudll->GetImageID(i);
                            int nTest =debenudll->SelectImage(idxImage);
                            int nRes = debenudll->ImageHorizontalResolution();
                            nRes = debenudll->ImageHeight();//this function works

                        }
                  }


the image is a jpeg2000. Is it a problem for getting the resolution ? is it possible with the width and height to convert it and getting the resolution in dpi ?




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