Hi Padmanabhan,
Hi Padmanabhan,
The size of the original file is 1,182,292 bytes.
After executing this line of code
byte[] strFileOne = GetDocument(AODocFormsInput.strSourceFiles[pdfCnt], AODocFormsInput.strUserName, AODocFormsInput.strPassword, AODocFormsInput.strDomain);
strFileOne is 1,182,292 bytes.
However, once the file is loaded using this line
pdfDocument = new Document(mstrFileOne);
pdfDocument is only about 260K and the content of this PDF does not match the original PDF.
The size of this PDF is about 3 KB.
The content just says
To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade
to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html
For further support, go to www.adobe.com/support/products/acrreader.html
This document is attached.v
padmanabhang:The size of the original file is 1,182,292 bytes.
After executing this line of codebyte[] strFileOne = GetDocument(AODocFormsInput.strSourceFiles[pdfCnt], AODocFormsInput.strUserName, AODocFormsInput.strPassword, AODocFormsInput.strDomain);
strFileOne is 1,182,292 bytes.
However, once the file is loaded using this line
pdfDocument = new Document(mstrFileOne);
pdfDocument is only about 260K and the content of this PDF does not match the original PDF.
The size of this PDF is about 3 KB.
The content just saysTo view the full contents of this document, you need a later version of the PDF viewer. You can upgrade
to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html
For further support, go to www.adobe.com/support/products/acrreader.html
This document is attached.v
Hi Padmanabhan,
The original file was uploaded with the first post - you can see at the top of this page. The file is called 1169NY-CR.pdf
Any updates on this issue?
Hi Padmanabhan,
Document pdfDocument = new Document();<o:p></o:p>
byte[] strFileOne = System.IO.File.ReadAllBytes("c:/pdftest/1169NY-CR-Aspose.pdf");
MemoryStream mstrFileOne = new MemoryStream(strFileOne);
pdfDocument = new Document(mstrFileOne);
Console.WriteLine(pdfDocument.Pages.Count);
You are loading the wrong file ..
1169NY-CR-Aspose.pdf1169NY-CR-Aspose.pdf is the messed up file.
Try this :
[C#]
Document pdfDocument = new Document();<?xml:namespace prefix = o />
byte[] strFileOne = System.IO.File.ReadAllBytes("c:/pdftest/1169NY-CR.pdf");
MemoryStream mstrFileOne = new MemoryStream(strFileOne);
pdfDocument = new Document(mstrFileOne);
Console.WriteLine(pdfDocument.Pages.Count);
Hi Padmanabhan,
try<o:p></o:p>
{
byte[] strFileOne = System.IO.File.ReadAllBytes("c:/pdftest/1169NY-CR (1).pdf");
MemoryStream mstrFileOne = new MemoryStream(strFileOne);
Document pdfDocument = new Document(mstrFileOne);
Console.WriteLine(pdfDocument.Pages.Count);
pdfDocument.Save("c:/pdftest/Processsed_pdf.pdf");
mstrFileOne.Close();
}catch(Exception ex)
{Console.WriteLine(ex);}
Secondly, the file 1169NY-CR-Aspose.pdf it self is 3KB document and it contains the message stating "To view the full contents of this document...". I am afraid I am unable to understand the problem that you are facing with this file. We are really sorry for this inconvenience.
Can you please share some further details regarding the problem and the scenario in which you are facing it.
Please try this code:
try
{
Document pdfDocumentOrg = new Document();
byte[] strFileOne = System.IO.File.ReadAllBytes(@“D:\Users\pganesa1\1169NY-CR.pdf”);
MemoryStream mstrFileOne = new MemoryStream(strFileOne);
Document pdfDocument = new Document(mstrFileOne);
Console.WriteLine(pdfDocument.Pages.Count);
pdfDocumentOrg.Pages.Add(pdfDocument.Pages);
pdfDocumentOrg.Save(@“D:\Users\pganesa1\Processsed_pdf.pdf”);
mstrFileOne.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex); }
pdfDocumentOrg does not match the original document.
Aspose Version is 7.6.0.0 - we cannot change to 7.7 since it has breaking changes.
Hi Padmanabhan,
Thanks for providing additional information, I've managed to reproduce the issue at my end and logged it as PDFNEWNET-35060 in our issue tracking system for further investigation and resolution. We will keep you updated regarding issue status via this thread.
Sorry for the inconvenience faced.
<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:Calibri;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>Best Regards,
(see the empty list of standard Acro fields and /NeedsRendering true).
How can I check if the PDF is a XFA form?
Also I have the latest Acrobat reader and I have no problem loading the PDF. I am having problems with the Aspose PDF toolkit. Is there an alternate way of loading the PDF and flattening it ?