Print Page | Close Window

DAGetImageDataAsString Not Found

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=3560
Printed Date: 26 Apr 24 at 10:08AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DAGetImageDataAsString Not Found
Posted By: imsudheer
Subject: DAGetImageDataAsString Not Found
Date Posted: 10 May 18 at 12:35PM
I am trying to get the Image data which inside a PDF.


int DocumentID = pdfLibrary.DAOpenFile(fileName, "");
                    //pdfLibrary.SelectDocument(DocumentID);

                    var pageCount = pdfLibrary.DAGetPageCount(DocumentID);
                    //int images = pdfLibrary.FindImages();

                    //string numberOfImages = Convert.ToString(images);
                    string filename = "";

                    // Iterate through each page
                    for (int i = 1; i <= pageCount; i++)
                    {
                        // Select current page
                        pdfLibrary.SelectPage(i);

                        //var extractedText = pdfLibrary.GetPageText(0);
                        //Console.WriteLine("Extracted Text " + extractedText);

                        var pageRef = pdfLibrary.DAFindPage(DocumentID, i);

                        // Get list of images on the page
                        il = pdfLibrary.DAGetPageImageList(DocumentID, pageRef);

                        // Count number of images in the list
                        int ic = pdfLibrary.DAGetImageListCount(DocumentID,il);
                        for (int k = 1; k <= ic; k++)
                        {
                            // Iterate through each image and get the
                            // image type and image ID
                            int it = pdfLibrary.GetImageListItemIntProperty(il, k, 400);
                            int gid = pdfLibrary.GetImageListItemIntProperty(il, k, 405);
                            var imageIndex = pdfLibrary.GetImageID(k);

                            var data = pdfLibrary.DAGetImageDataAsString(DocumentID, ic, k);


My need is to get the Image resolution and Image bytes and the Image formats. But DAGetImageDataAsString is missing. Am I missing any thing?




Replies:
Posted By: Ingo
Date Posted: 10 May 18 at 12:56PM
have a look into these two samples:
http://www.debenu.com/kb/extract-images-from-pdf-files-as-the-appropriate-image-type/
http://www.debenu.com/kb/get-embedded-image-coordinates-from-pdf-files/
here you can read about the relevant functions:
http://www.debenu.com/docs/pdf_library_reference/ImageHandling.php
here you'll find all what a developer needs:
http://www.quickpdf.org/



-------------
Cheers,
Ingo




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