Bug#519466: Patch for iText to solve stdin issue

2009-04-22 Thread Jochen Schmitt

Hallo,

Because an uaser has complaints, that the last solution for the stdin issue
doesn't works corretly in all cases, I have remove the stdin patch 
provided in

my last comment.

Instead I have add the following patch on the iText package in the Fedora
distribution:

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.0 +0200
+++ 
itext-2.1.5/src/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java  
2009-04-21 18:17:08.0 +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 {
itext-2.1.5-pdftk.patch (END)

A whole description of the users complaints you may find at:

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




--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#519466: Additional information for this bug

2009-03-31 Thread Jochen Schmitt

Hallo,

on https://bugzilla.redhat.com/process_bug.cgi an user has complaint, 
that the
handling of the standard input was not working properly after the 
iText-2 migration.


The follwing patch should fixed this issue:

diff -up pdftk-1.41/pdftk/pdftk.cc.org pdftk-1.41/pdftk/pdftk.cc
--- pdftk-1.41/pdftk/pdftk.cc.org   2009-03-31 17:22:27.0 +0200
+++ pdftk-1.41/pdftk/pdftk.cc   2009-03-31 17:27:21.0 +0200
@@ -586,7 +586,10 @@ TK_Session::dump_session_data() const
   for( vector InputPdf ::const_iterator it= 
m_input_pdf.begin();

it!= m_input_pdf.end(); ++it )
   {
-   cout   it-m_filename;
+   if(it-m_filename == /dev/stdin)
+cout standard input;
+   else
+  cout   it-m_filename;
   if( !it-m_password.empty() ) {
   cout  ,   it-m_password;
   }
@@ -976,6 +979,8 @@ TK_Session::TK_Session( int argc,

   InputPdf input_pdf;
   
input_pdf.m_filename= argv[ii];
+   
if(input_pdf.m_filename == -)
+   
input_pdf.m_filename = /dev/stdin;
   
m_input_pdf.push_back( input_pdf );

   }
   else { // use given handle for 
filename; test, first






--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org