My customer preseted me with 3 PDF files that cannot be opened in Adobe, Foxit Reader, Spicer Imagenation, or by an open source PDF library.
Each of these tools report that the source PDF file is corrupt.
When using PDF Creator .NET (acPDFCreatorLib.Net.dll version 3.0.3.4), however, the followng code snippet executes without any errors.
(number of pages reported is 1, and PDF Version is reported as 1.2)
Code: Select all
using (var pdf = new IacDocument(null))
{
Inform("Open file: {0} for stamping.", inputFile);
using (var fs = File.Open(inputFile, FileMode.Open, FileAccess.Read, FileShare.Read))
{
pdf.Open(fs, string.Empty);
}
pages = pdf.PageCount;
Inform("Number of pages to stamp = {0}.", pages);
}
Any guidance anyone can give would be most helpful.
Thanks,
Nick