Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - DAOpenFile error
  FAQ FAQ  Forum Search   Register Register  Login Login

DAOpenFile error

 Post Reply Post Reply
Author
Message
RRogers View Drop Down
Beginner
Beginner
Avatar

Joined: 25 Feb 15
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote RRogers Quote  Post ReplyReply Direct Link To This Post Topic: DAOpenFile error
    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;

}

Back to Top
ozbobwa View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Feb 15
Location: Perth Oz
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ozbobwa Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store