Print Page | Close Window

Load File/Open File Differences

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=2631
Printed Date: 04 Apr 26 at 7:25PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Load File/Open File Differences
Posted By: chrisreed
Subject: Load File/Open File Differences
Date Posted: 02 May 13 at 4:33AM
I understand the difference between the LoadFromFile and DAOpenFile functions, but what I don't understand is that once the PDF file has been loaded/opened why do other functions used afterwards produce different results:
 
eg. HasFontResources
LoadFromFile = 1
DAOpenFile = 0
 
eg. GetInformation
LoadFromFile -> Author = Administrator, Title = Old Report
DAOpenFile ->    Author = "",                   Title = ""
Plus Creator, Producer, Creation Date and Modification Date are all different.
 
Isn't the format/contents of the PDF exactly the same regardless of how you Load/Open the PDF File?
 
Chris



Replies:
Posted By: Ingo
Date Posted: 02 May 13 at 7:25AM
Hi Chris!
 
Perhaps the problem will be clearer if you can offer the document anywhere for test download.
Or is it a common prob with any document?
 
Cheers, Ingo


Posted By: chrisreed
Date Posted: 02 May 13 at 8:10AM
No it happens on ANY PDF File I load or open.
 
What is strange is that if I use the LoadFile function first followed by the DAOpenFile function the two GetInformation function both get the correct information, but not the other way around.
 
I would show you my code, but it is in LabVIEW and hence is a picture and I can't upload a picture to this post.  Is there a public space on the web where I can upload my pictures to and provide a link to that?
 
Chris


Posted By: Ingo
Date Posted: 02 May 13 at 12:24PM
Hi Chris!
 
For free upload-space you can search on Google.
There are many file hoster offering their services.
The other thing:
You can't use LoadFromFile and DAOpenFile together.
It doesn't matter if one way round it works and the other
way round not - Don't mix it.
Still from your first post:
If you're using DALoadFromFile it's absolutely necessary
to use the DA-functions to get the metadata like "author",
"subject", and so on. Again: Don't mix DA- and non-DA
in one code part between create and free.
 
Cheers, Ingo
 


Posted By: chrisreed
Date Posted: 03 May 13 at 11:09AM
Hi Ingo,
Here is the link to my code in LabVIEW.....  http://postimg.org/gallery/6uafpxai/ -


Posted By: AndrewC
Date Posted: 08 May 13 at 2:04PM
Chris,

As Ingo says,  when you load a file using DAOpenFile then you can only use functions starting with DA to work with this file.   The standard functions will not work with a file that has been opened with DAOpen file.  

Basically, you cannot mix DA and standard calls and expect them to work.  Both sets of functions use completely different methods to work with a PDF file.

GetAnalysisInfo is a 3rd way of working with a PDF file as it uses a filename - the function automatically opens the file, gets the required information and closes the file for you.

There is of DALoadFromFile - only DAOpenFile.  Most people use QP.LoadFromFile.  You really only need the DA functions for quite large PDF files.

Andrew.



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