I have a very strange problem and I can not believe what happens at Amazon EC2 instance.
I am loading PDFs and removes the data and returns the output as string using the iThesship component (version 5.4.1). This is working fine in my local machine.
But when I posted in Amazon EC2 (Windows Server 2008 R2) and was not working and got an error, I got the error in the log file as below.
java.io.IOException: error: end-of-file, expected line iTextSharp.text.exceptions.InvalidPdfException: PDF header signature is not found my code below And any help / suggestions would really appreciate. Public Stabilized String Paraswasing PDF Box (String PDF File Path) {PDF Reader Reader = New PDF Reader (PDF File Path); String Vector output = new stringwriter (); (Int i = 1; i & lt; = reader.NumberOfPages; i ++) output.WriteLine (PdfTextExtractor.GetTextFromPage (Reader, I, New SimpleTextExtractionStrategy ()); Reader.Dispose (); Return output. Toasting (); } I have all administrator rights for EC2 example and Net Framework 4.0 has been used
read
First check for 5 bytes.
On your local system, they can be found in the '%' , 'P' , 'D' , 'F' , '-' . On their Amazon EC2 example, they are not.
Check all the bytes to see if this is incorrect.
No comments:
Post a Comment