Print Page | Close Window

DAOpenFile error

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=3081
Printed Date: 01 May 24 at 2:16PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DAOpenFile error
Posted By: RRogers
Subject: DAOpenFile error
Date Posted: 25 Feb 15 at 11:05PM
I am using the ActiveX QuickPDF Library with following code in C#.
I am getting Error: "Invalid Structure, file damaged" when it tries to open the file
that I rendered to disk.
 
I can open the file in windows explorer but not with the DAOpenFile command.
 
Why does it think the file is damaged?

switch

 

 

(QP.RenderPageToFile(300, i, 9, HTMLFileName))

{

case 0:

MessageBox.Show("The page could not be rendered. Check the value of the FileHandle and PageRef parameters.");

break;

case 1:

QPInstance = QP.DAOpenFile(HTMLFileName, pswd);

if (QPInstance == 0)

{

LastError = QP.LastErrorCode();

ShowQPDFError(LastError);

}

else

{

MessageBox.Show("Instance = " + QPInstance);

}

break;

case 2:

MessageBox.Show("The file could not be written to disk");

break;

}




Replies:
Posted By: ozbobwa
Date Posted: 26 Feb 15 at 3:36AM
hi RRogers - I'm new to the forum but interested in your post.
Could you post the code (or a cutdown version) that populated the QP object before you wrote it out to file.  My initial guess is that QP is writing a feature to disk that is not supported by the QP.DAOpenFile.   Also, you may not need to specify the pswd, as you didn't specify one when calling RenderPageToFile....


Posted By: Ingo
Date Posted: 26 Feb 15 at 7:08AM
Hi RRogers,
 
think you've got this issue while mixing DA- and non-DA-functions.
In one instance these two kinds of functions shouldn't be mixed.
For further help:
The code part before RenderPageToFile could be more interested than
the part after ;-)
 
Cheers and welcome here,
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