Print Page | Close Window

Save EbmeddedFile on the drive using PDFViewer

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=3079
Printed Date: 03 May 24 at 9:40AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Save EbmeddedFile on the drive using PDFViewer
Posted By: BMWTester
Subject: Save EbmeddedFile on the drive using PDFViewer
Date Posted: 19 Feb 15 at 9:59PM
Hi

I used PDFViewer on my C# project in VS2008. I would like to build the attachment panel.  On the below code I can get the correct number of attachment file on pdf.  I  used axDPVActiveX1.DQPLGetEmbeddedFileContentToFile  method for saving the attachment on other location. The file I saved cannot open on Adobe Reader. It indicated that the file is either not a support type or because the file has been damaged.   Would someone tell me what is wrong with my code. Thanks in advance.

 for (int i = 1; i <= axDPVActiveX1.DQPLEmbeddedFileCount(); i++)
            {

                axDPVActiveX1.DQPLSelectPage(i);

                string str = "Index: " + i.ToString() + Environment.NewLine;
                str+= "File nmae: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 1) + Environment.NewLine;
                str += "MIME type: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 2) + Environment.NewLine;
                str += "Creation date: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 3) + Environment.NewLine;
                str += "Modification date: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 4) + Environment.NewLine;
                str += "Title: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 5) + Environment.NewLine;
                str += "Description: " + axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 7) + Environment.NewLine;
                str += "ID: " + axDPVActiveX1.DQPLGetEmbeddedFileID(i) + Environment.NewLine;             

                MessageBox.Show(str);
                if (axDPVActiveX1.DQPLGetEmbeddedFileStrProperty(i, 5).Contains(".pdf"))
                {
                    axDPVActiveX1.DQPLGetEmbeddedFileContentToFile(i, @"C:\Users\UserName\Desktop\Testing folder\test_" + i.ToString() + ".pdf");
                }

               

            }



Replies:
Posted By: BMWTester
Date Posted: 27 Feb 15 at 6:20PM
The code is fine. The test pdf file is malformed.


Posted By: Ingo
Date Posted: 27 Feb 15 at 7:12PM
Hi,

you've posted this a week ago and it seems to me that there aren't similar probs for other users.
So why not post this issue on the official support page from Debenu?
http://www.debenu.com/support/issue-report/" rel="nofollow - http://www.debenu.com/support/issue-report/

Cheers and have a nice weekend,
Ingo



-------------
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