Hallo,

I'm the maintainer of pdftk and the co-maintainer for iText on the Fedora project.

After we have migrate pdftk to iText-2.1.5 an user has complaints, that they could
not read a pdf file from stdin.

https://bugzilla.redhat.com/show_bug.cgi?id=495574

To solve this issue I have create a patch which is attached on this mail.

Following the guideline of the Fedora project I want to provide this patch to you
for upstream integration.

Best Regards:

Jochen Schmitt


diff -up itext-2.1.5/src/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java.pdftk itext-2.1.5/src/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java
--- itext-2.1.5/src/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java.pdftk	2009-04-21 18:12:02.000000000 +0200
+++ itext-2.1.5/src/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java	2009-04-21 18:17:08.000000000 +0200
@@ -99,7 +99,11 @@ public class RandomAccessFileOrArray imp
                 }
             }
             else {
-                InputStream is = BaseFont.getResourceStream(filename);
+		InputStream is;
+		if( filename.equals("-"))
+		    is = System.in;
+		else
+		    is = BaseFont.getResourceStream(filename);
                 if (is == null)
                     throw new IOException(filename + " not found as file or resource.");
                 try {
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to