I try to count bookmark in PDF File using these simple function :
Code: Select all
private void traiteFichier(string fic)
{
GdPicturePDF nPdf = new GdPicturePDF();
GdPictureStatus st = nPdf.LoadFromFile(fic, false); // I also try with true
if (st != GdPictureStatus.OK)
{
MessageBox.Show("Erreur " + st.ToString());
return;
}
int rt = nPdf.GetBookMarkCount();
if (rt < 0)
{
GdPictureStatus sta = nPdf.GetStat();
MessageBox.Show("Erreur " + sta.ToString());
}
button1.Text = rt.ToString();
nPdf.CloseDocument();
}
I have 2 PDF files, the first is at 1,2 Gb (1243028 ko) and the second at 3,3 Gb (3337988 ko). These PDF are not damaged and I can open it with Adobe Acrobat Pro 9.
I build my test application in 32bits and 64bits. In 32 bits, I can't open both file. In 64 bits mode, the "small" one (1,2 Gb) work fine, but with the big one 3.2 Gb, I get error "CanNotOpenFile". I try to launch programme outside Ms Visual Studio : same result.
My computer :
Dell Vostro i7
8 Gb Mem
Win 7 Pro 64 bits
Ms Visual Studio 2010
Note : I use the lastest GdPicture .net ToolKit (9.3.3 5th nov).