|
Hi there.
I just want to get .pdf file related inforamtion like Title, Author, Subject, Keywords, Created, Modified etc.
1. Do we have Windows APIs for the same?
2. Or I need to use Adobe provided APIs. In case Adobe APIs, then can someone please suggest some pointer in regard to Adobe APIs to do the job.
Thanks & Regards
PanB
|
|
|
|
|
For Modified Date and Time I can use _strtime(timebuf) and _strdate(datebuf) APIs. Any pointers for Title, Author, Subject, Keywords will be helpful...Thanks
|
|
|
|
|
The information you desire can easily be obtained by calling StgOpenStorageEx() , and then getting an IPropertyStorage interface.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Windows has no PDF APIs.
Here's a link[^] to the Adobe PDF SDK - you need a license from Adobe to use that.
There are other alternatives - Google for "PDF SDK".
If you were using Mac OS X, you could be using PDFKit[^] - PDF support is built into OS X.
|
|
|
|
|
Thanks. Anyway, like we can get file info. using Windows API, Can't we use Windows APIs to get info. for .pdf file. They are also files...I mean if I can get its modified date/time using Windows APIs then there should be some way to get rest of the information. Just want to know about this for knowledge purpose.
|
|
|
|
|
As Stuart said there is no native Windows API to read a .pdf file. As it's an Adobe file format and not a Microsoft format why would there be?
Date and time info is common to all files in the file system so there are API ways to read and write it. The data you're looking for is specific to Adobe's pdf format, so you'll need to look elsewhere like the links Stuart gave to find a way to programatically read it.
|
|
|
|
|
BonshatS wrote: The data you're looking for is specific to Adobe's pdf format...
No, it's part of the compound document interface.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
My mistake.
|
|
|
|
|
|
Thankyou Guys for all your help and support.
I will try your provided suggestions and will update you all on the same.
Thanks once again. Take care.
PanB
|
|
|
|
|
Hey David.
Just tried that code, but it seems that .pdf file is not a compound file. Any pointers on this.
Thanks
PanB
|
|
|
|
|
Hi All,
I have converted my Mfc Application as Dll.. I have done following steps
to Make my MFC Application to DLL
a) the WinApp of my application i have made as the Win App Of the DLL
b) Rest All Required .h and .cpp i have added to Dll
c) Changed the Resources Accordingly
d) Created a Function which will be called from Dll (this Function is empty)
d)Created a Windows forms Application =>created a Form =>Added Button
=> On Click of Button i am Calling the dll function using pInvoke(DLLImport)
From the main Dll i call the serilisation of respective Dll.. the thing happening is like the my MFC Dll gives me Archieve Exception while retrieving the data.. the same does not happen if i am running the application not as Dll..
Please suggest me some help...
Thanks
Samir
|
|
|
|
|
What about trying to debug?
- ns ami -
|
|
|
|
|
Hi frnds, when i compile VC++ project on 32 bit machine then it wont work on 64 bit machine...can we compile the same code so that it will work on 32/64 bit machine?? someone told me abt compiler option..but i dont know abt cmd...if u know something, then plz share ur knowledge...Regards
http://nnhamane.googlepages.com/
|
|
|
|
|
|
The top thing here is 64 bit EXEs cannot load 32 bit DLLs and vice versa.
A 32 bit EXE will run normally on a 32 bit OS and inside the WOW64 shell on a 64 bit OS.
It will execute on both nevertheless.
A 64 bit EXE will run only on a 64 bit OS.
So your statement "when i compile VC++ project on 32 bit machine then it wont work on 64 bit machine" is not true.
And if you have installed the 64 bit compilers, you can use Configuration Manager to change the platform from Win32 to x64 to build 64 bit binaries.
«_Superman_»
|
|
|
|
|
Hi to all,
Someone helped me on other forum to convert a string in any language to it's bytes format, using following code.
string s = "François";
byte[] unicodeBytes = Encoding.Unicode.GetBytes(s);
byte[] aBytes = Encoding.Convert(Encoding.Unicode, Encoding.GetEncoding(28599), unicodeBytes);
He told me to use WideCharToMultiByte() in C++ for above C# code.
He help me a lot.
But I want to know that, is there any method to get the character code for given value in string s to convert that string in bytes?
Is there any software or dlls to release the application with some evalution period?
Regards,
Aniket A. Salunkhe
|
|
|
|
|
You can typecast each character using wchar_t to get the unicode value or using char to get the ascii value.
int i = wchar_t(s[0]);
int j = char(s[0]);
«_Superman_»
|
|
|
|
|
I am getting wrong output when I have string in Arabic Language.
I want to convert a string (in any langauge) to bytes format as geiven in Annex A of
ETSI EN 300 468 V1.9.1 (2008-11)
Digital Video Broadcasting (DVB) :
Specification for Service Information (SI) in DVB systems
For that someone has suggested to use System.Text.Encoding. But to use that, I must know the codepage before compilation.
So is there any method to retrieve codepage?
|
|
|
|
|
Aniket Salunkhe wrote: So is there any method to retrieve codepage?
You can get code page information using APIs like GetACP , GetCPInfo etc.
«_Superman_»
|
|
|
|
|
Hi,
Thanks for suggestion.
But if I am having two strings s1 & s2, each having value in 2 distinct languages, how can I use above functions to convert them (there characters) into byte format?
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
Can someone help me with Visual C++ code for plugins for Internet Explorer/Mozilla Firefox for simple MP3 player that buffers and plays an audio file and uses a seperate decoder that has been developed.Decoder is available.Need to develop plugin that uses this decoder.A simple MP3 audio player that is a plugin for IE or any other browser will do.
Thanks,
Priya
|
|
|
|
|
|
I have displayed a messagebox with MB_RTLREADING flag.
The string that i tried to display is some thing like: "Name(First Name)"
However I am getting the display of "(Name ( First Name"
The syntex used for the messagebox was as follows:
MessageBox(NULL,"Name (FULL NAME)","good",MB_RTLREADING );
Please suggest what setting i am missing?
|
|
|
|
|
MessageBox("(Name( FULL NAME","good",MB_RTLREADING );
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|