Sorry - my fault...sys.argv[0] refers to the name of the script and not to the pdf filename parameter which would be sys.argv[1].
Andreas iText Info wrote > > On Sun, 27 Nov 2011 08:28:28 -0800 (PST), yet <yet@> wrote: >> I am using the following Python code for iText evaluating purposes. >> >> import sys >> from com.itextpdf.text.pdf import PdfReader; >> from com.itextpdf.text.pdf.parser import PdfReaderContentParser; >> >> reader = PdfReader(sys.argv[0]) > > What is sys.argv[0]? > I assume it's a path to a file. > Read it without using iText and inspect the first bytes. > I bet the file you claim to be a PDF doesn't start with %PDF-1. > Maybe Python makes the bytes corrupt or doesn't call the Java classes > correctly. > How are you using iText from Python? > Because there's no problem whatsoever if you use iText (Java) or > iTextSharp (C#). > >> sucmac:aspose-pdf-kit-4 > > Aspose? Is Aspose using iText? > >> I receive the same error with all PDF files as input that I could >> find....why? > > 1. You didn't post your question on the correct mailing list; see > http://lowagie.com/itextml and http://lowagie.com/node/205 > 2. You have a reference to Aspose. > 3. You're not coding in Java nor in C#. > Are you sure you are using the one and only official iText? > Please understand that your question is confusing as we can't reproduce > the problem with valid PDFs. > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > iText-questions mailing list > iText-questions@.sourceforge > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) is a registered trademark of 1T3XT BVBA. > Many questions posted to this list can (and will) be answered with a > reference to the iText book: http://www.itextpdf.com/book/ > Please check the keywords list before you ask for examples: > http://itextpdf.com/themes/keywords.php > -- View this message in context: http://itext-general.2136553.n4.nabble.com/PDF-header-signature-not-found-with-all-PDF-files-tp4112795p4121995.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php