[iText-questions] PdfReader error

2002-06-13 Thread McGowan, Jeffery M

I'm trying to take a pdf that I have stored in an oracle database and to
then use iText to alter the pdf then output it as stream to a web client.
I'm trying to do this without using any files, only streams.

The problem I have is that although I appear to be getting the stream of the
oracle blob; when I try to convert it to a byte[]  I get this error:

java.io.IOException: PDF startxref not found.
at com.lowagie.text.pdf.PRTokeniser.getStartxref(Unknown Source)
at com.lowagie.text.pdf.PdfReader.readXref(Unknown Source)
at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
at com.lowagie.text.pdf.PdfReader.init(Unknown Source)
at Test.main(Test.java:197)


and these are the last few lines when I print the output of the pdf:

/CreationDate (D:20020506141920)
/Producer (Acrobat Distiller 4.05 for Windows)
/ModDate (D:20020506163216-04'00')
 
endobj
xref
0 3 
00 65535 f
013590 0 n
013654 0 n
trailer

/Size 3
/ID[fd410d69fcd8f410ab0eb70c99931970fd410d69fcd8f410ab0eb70c99931970]

startxref
173
%%EOF


It looks to me as if this is the line its looking for but can't find for
some reason.


Does anyone have any ideas about this.


Thanks.


--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, 
proprietary copyrighted and/or legally privileged, and is intended solely for the use 
of the individual or entity named in this message.  If you are not the intended 
recipient, and have received this message in error, please immediately return this by 
e-mail and then delete it.

==


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Barcodes

2002-06-13 Thread Santosh Vantmuri

Does itext support the following standards

Code 128
- MicroPDF417 
- Data Matrix ECC200
- Code 128 and Code 39 (AIM USA)
- UCC/EAN SCC-14
- UCC/EAN 128
- Interleaved 2 of 5 (AIM USA)

regards
santosh

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Barcodes

2002-06-13 Thread Paulo Soares


--- Santosh Vantmuri [EMAIL PROTECTED] wrote:
 Does itext support the following standards
 
 Code 128
 - MicroPDF417
No 
 - Data Matrix ECC200
No
 - Code 128 and Code 39 (AIM USA)
Yes
 - UCC/EAN SCC-14
Yes
 - UCC/EAN 128
Yes
 - Interleaved 2 of 5 (AIM USA)
Yes

Best Regards,
Paulo Soares

 
 regards
 santosh
 

___
 
 Don't miss the 2002 Sprint PCS Application
 Developer's Conference
 August 25-28 in Las Vegas -

http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

https://lists.sourceforge.net/lists/listinfo/itext-questions


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] 2 questions

2002-06-13 Thread Aristo . Togliatti


Hi all,

I would like to align some text in a table's cell on the right side, what's
the easiest way to do it?

And I would like to insert a horizontal line in a cell as well, is it
possible or do I have to create a flat cell with bg=black?

Thanks a lot,

A.

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] File does not begin with %PDF

2002-06-13 Thread Fred Boulos

Hey,
has anyway encountered the specifics to the following error which happens with IE when 
streaming back a generated pdf file: File does not begin with %PDF.

There is no problem with Netscape, Mozilla, or Opera, strictly IE on various versions 
of Windows. I am using iText to generate the PDF on the fly and stream it back over an 
SSL enabled connection. I have downloaded the file and verified that it is formatted 
correctly, and have also opened the same file directly in IE from my harddrive to 
ensure that IE does correctly recognize the file which it does.

I have seen through several news groups that others have had the same problem, but no 
one has actually posted a workaround. I know that it is directly related to the web 
integration with Acrobat Reader, but disabling web integration is not an issue.

Anyone encounter this?

Thank you kindly,
Fred.


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] File does not begin with %PDF

2002-06-13 Thread jim moore

Sorry about the **SPAM** header in the last message. I have a client side
spam filter that prepends that to the subject of any suspected spam. For
some reason, list messages always get flagged, and I forgot to remove it in
the last message.

--jim


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



RE: [iText-questions] 2 questions

2002-06-13 Thread Matt Benson

I'll tell you what I think Bruno might say:  Make two
Cells, one left-aligned, the other right-aligned.  If
you place them side by side, remove the borders
between the Cells, and perhaps play with cellpadding
and cellspacing you may be able to get them to look
like one Cell.

-Matt

--- [EMAIL PROTECTED] wrote:
 Hi,
 
 what I really need to do is to align some text on
 the left and some on the
 right of a cell (on the same line), do you think
 it's possible?
 
 Thanks,
 
 A.
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED]]
 Sent: den 13 juni 2002 15:44
 To: [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [iText-questions] 2 questions
 
 
 For right alignment on a Cell, just use
 cell.setHorizontalAlignment(Element.ALIGN_RIGHT)
 
 Don't know about the line...what about either:
 
 use a nested table, two rows, one column, or
 use rowspan=2 for all cells that do not need a
 horizontal line
 
 HTH,
 -Matt
 
 --- [EMAIL PROTECTED] wrote:
  
  Hi all,
  
  I would like to align some text in a table's cell
 on
  the right side, what's
  the easiest way to do it?
  
  And I would like to insert a horizontal line in a
  cell as well, is it
  possible or do I have to create a flat cell with
  bg=black?
  
  Thanks a lot,
  
  A.
  
 

___
  
  Don't miss the 2002 Sprint PCS Application
  Developer's Conference
  August 25-28 in Las Vegas -
 

http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
  
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: **SPAM** [iText-questions] File does not begin with %PDF

2002-06-13 Thread jim moore

I know this problem well (I spend 3 full days trying to track it down).

My guess is that you are using IE 5.5. The problem is with the browser not
iText and not the version of windows. There is a problem with IE 5.5 (works
fine in IE 5 and IE 6) that it tries to download pdf's into its local cache
and load them from there. At least in tomcat 4 (I haven't tried other app
servers), servlet content gets marked no-cache to keep proxy servers from
caching it. So this no-cache header tells IE not to cache the file, but then
IE 5.5 goes ahead and tries to load it from the cache anyway. The File does
not begin with %PDF is true because what IE just loaded was a file that did
not exist (it loads it as zero bytes) so clearly it doesn't start with
anything.

The solution: upgrade IE 5.5 to the latest service pack or upgrade to IE 6.
(or maybe try a different app server if you are using tomcat 4--the bug
could be in the tomcat 4/ie 5.5 combination--though the fact that ms fixed
this problem in a service pack points heavily to the problem being their's).

--jim


- Original Message -
From: Fred Boulos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 10:11 AM
Subject: **SPAM** [iText-questions] File does not begin with %PDF


 Hey,
 has anyway encountered the specifics to the following error which happens
with IE when streaming back a generated pdf file: File does not begin with
%PDF.

 There is no problem with Netscape, Mozilla, or Opera, strictly IE on
various versions of Windows. I am using iText to generate the PDF on the fly
and stream it back over an SSL enabled connection. I have downloaded the
file and verified that it is formatted correctly, and have also opened the
same file directly in IE from my harddrive to ensure that IE does correctly
recognize the file which it does.

 I have seen through several news groups that others have had the same
problem, but no one has actually posted a workaround. I know that it is
directly related to the web integration with Acrobat Reader, but disabling
web integration is not an issue.

 Anyone encounter this?

 Thank you kindly,
 Fred.


 __
 Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

 Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


 ___

 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: **SPAM** [iText-questions] File does not begin with %PDF

2002-06-13 Thread Fred Boulos

Hey Jim,
thanks for the info.

We are encountering the problem with IE 5 and 5.5, both Service Pack 2, and are using 
WebSphere on AIX. 

jim moore [EMAIL PROTECTED] wrote:

I know this problem well (I spend 3 full days trying to track it down).

My guess is that you are using IE 5.5. The problem is with the browser not
iText and not the version of windows. There is a problem with IE 5.5 (works
fine in IE 5 and IE 6) that it tries to download pdf's into its local cache
and load them from there. At least in tomcat 4 (I haven't tried other app
servers), servlet content gets marked no-cache to keep proxy servers from
caching it. So this no-cache header tells IE not to cache the file, but then
IE 5.5 goes ahead and tries to load it from the cache anyway. The File does
not begin with %PDF is true because what IE just loaded was a file that did
not exist (it loads it as zero bytes) so clearly it doesn't start with
anything.

The solution: upgrade IE 5.5 to the latest service pack or upgrade to IE 6.
(or maybe try a different app server if you are using tomcat 4--the bug
could be in the tomcat 4/ie 5.5 combination--though the fact that ms fixed
this problem in a service pack points heavily to the problem being their's).

--jim


- Original Message -
From: Fred Boulos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 10:11 AM
Subject: **SPAM** [iText-questions] File does not begin with %PDF


 Hey,
 has anyway encountered the specifics to the following error which happens
with IE when streaming back a generated pdf file: File does not begin with
%PDF.

 There is no problem with Netscape, Mozilla, or Opera, strictly IE on
various versions of Windows. I am using iText to generate the PDF on the fly
and stream it back over an SSL enabled connection. I have downloaded the
file and verified that it is formatted correctly, and have also opened the
same file directly in IE from my harddrive to ensure that IE does correctly
recognize the file which it does.

 I have seen through several news groups that others have had the same
problem, but no one has actually posted a workaround. I know that it is
directly related to the web integration with Acrobat Reader, but disabling
web integration is not an issue.

 Anyone encounter this?

 Thank you kindly,
 Fred.


 __
 Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

 Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


 ___

 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] PdfReader error

2002-06-13 Thread Paulo Soares

iText searches for the startxref in the last 1K of the file. See if the
array has the size of the PDF. A common problem is to get the blob from the
database as text and not as binary. Are you sure that if you get the PDF
from the database and then save it to a file it still opens?

Best Regards,
Paulo Soares

- Original Message -
From: McGowan, Jeffery M [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 8:56
Subject: [iText-questions] PdfReader error


 I'm trying to take a pdf that I have stored in an oracle database and to
 then use iText to alter the pdf then output it as stream to a web
 client.
 I'm trying to do this without using any files, only streams.

 The problem I have is that although I appear to be getting the stream of
 the
 oracle blob; when I try to convert it to a byte[]  I get this error:

 java.io.IOException: PDF startxref not found.
 at com.lowagie.text.pdf.PRTokeniser.getStartxref(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.readXref(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.init(Unknown Source)
 at Test.main(Test.java:197)


 and these are the last few lines when I print the output of the pdf:

 /CreationDate (D:20020506141920)
 /Producer (Acrobat Distiller 4.05 for Windows)
 /ModDate (D:20020506163216-04'00')
 
 endobj
 xref
 0 3
 00 65535 f
 013590 0 n
 013654 0 n
 trailer
 
 /Size 3
 /ID[fd410d69fcd8f410ab0eb70c99931970fd410d69fcd8f410ab0eb70c99931970
 ]
 
 startxref
 173
 %%EOF


 It looks to me as if this is the line its looking for but can't find for
 some reason.


 Does anyone have any ideas about this.


 Thanks.


 
 --
 Notice:  This e-mail message, together with any attachments, contains
 information of Merck  Co., Inc. (Whitehouse Station, New Jersey, USA)
 that may be confidential, proprietary copyrighted and/or legally
 privileged, and is intended solely for the use of the individual or
 entity named in this message.  If you are not the intended recipient,
 and have received this message in error, please immediately return this
 by e-mail and then delete it.

 
 ==


 ___

 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
 http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Unsupported Image Format

2002-06-13 Thread morpheus Smith

As the tutorial says  i tried to paas awt.Image object
to work around the unsupported format problem. This
works fine with dev environment. but when i try to do
this in production server , i'm getting an exception
for getDefaultToolkit() call as process which is
running jre doesn't have accces to X term. So my
question is , is there any way i can make gif images
to work with out using awt.Image or is there any way i
can create awt.Image object with out using
awt.Toolkit.

Thanks in advance
--Morphues

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Tool for creating images supported by Itext

2002-06-13 Thread morpheus Smith

Gif images created from photoshop, gimp and
photoeditor are not directly supported by iText b'cos
of gif standards. is there free tool available by
which i can create gifs supported by iText.

Thanks in advance.
-- morphues

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Tool for creating images supported by Itext

2002-06-13 Thread Leonard Rosenthol

At 2:41 PM -0700 6/13/02, morpheus Smith wrote:
Gif images created from photoshop, gimp and
photoeditor are not directly supported by iText b'cos
of gif standards. is there free tool available by
which i can create gifs supported by iText.


GIMP doesn't include the LZW support by default - nor does 
ImageMagick (http://www.imagemagick.org).  Both require that you 
enable them as part of the build process.


Leonard
-- 
---
Leonard Rosentholmailto:[EMAIL PROTECTED]
Chief Technical Officer  http://www.pdfsages.com
PDF Sages, Inc.  215-629-3700 (voice)
  215-629-0789 (fax)

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Tool for creating images supported by Itext

2002-06-13 Thread David Teran

yes, try imagemagick. If someone is interested, we have written a wrapper that makes 
runtime calls and converts images on the fly.

regards david

On Thursday, June 13, 2002, at 11:41 PM, morpheus Smith wrote:

 Gif images created from photoshop, gimp and
 photoeditor are not directly supported by iText b'cos
 of gif standards. is there free tool available by
 which i can create gifs supported by iText.

 Thanks in advance.
 -- morphues

 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com

 ___

 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions



___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] LZW compression

2002-06-13 Thread morpheus Smith

if support LZW compression requires licening from
unisys then why does iText force to use gifs with that
compression algorithm.
Al i missing something here.

thanks in advance
Morpheus

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] ImageMagick wrapper for java

2002-06-13 Thread David Teran

Here is a simple javaclass that can be used to talk with ImageMagick

package com.cluster9.pdfgenerator;

import com.cluster9.foundation.*;
import java.io.*;

public class ImageMagickWrapper {

 private ImageMagickWrapper() {
 super();
 }

 public static String imageType(byte[] image) throws IOException {
 //an PDF file must start with: %PDF
 InputStream fis = null;
 String imageType = null;

 String fileSignature = null;
 byte b[] = new byte[4];
 fis = new ByteArrayInputStream(image);
 int length = fis.available();

 if (length = 4) {
 fis.read(b, 0, 4);
 fileSignature = new String( b );

 if (fileSignature.toLowerCase().indexOf(pdf)!=-1) {
 return pdf;
 }
 }

 fis.close();

 fis = null;

 String result = null;

 String command = TYPE_PATH_TO_IMAGEMAGICK_IDENTIFY+ -;


 result = new String(process(new ByteArrayInputStream(image), command));

 if (result.toLowerCase().indexOf(gif)!=-1) {
 //its an gif

 imageType = gif;

 } else if (result.toLowerCase().indexOf(jpg)!= -1 || 
result.toLowerCase().indexOf(jpeg) != -1) {
 imageType = jpeg;

 } else if (result.toLowerCase().indexOf(png)!= -1 ) {
 imageType = png;

 } /*else if (result.toLowerCase().indexOf(tif)!= -1) {
 imageType = tiff;

 } */else {
 imageType = unsupported image;
 }

 return imageType;
 }


 public static byte[] convertImage(byte[] ori, String filetype) throws IOException 
{
 String command = TYPE_PATH_TO_IMAGEMAGICK_CONVERT +  -  + 
filetype.toUpperCase() + :-;
 byte[] result = process(new ByteArrayInputStream(ori), command);
 return result;
 }

 private static byte[] process(InputStream in, String command) throws IOException {
 Process p = Runtime.getRuntime().exec(command);
 InputStream pin = p.getInputStream();
 InputStream perr = p.getErrorStream();
 OutputStream pout = p.getOutputStream();

 ProcessReader processReader = new ProcessReader(pin);
 processReader.start();

 ProcessReader errorReader = new ProcessReader(perr);
 errorReader.start();

 byte[] buf = new byte[0x1];
 int count = 0;

 while((count = in.read(buf)) != -1) {
 pout.write(buf, 0, count);
 }

 pout.close();

 String errorMessage = new String(errorReader.getResult());
 if (errorMessage != null  errorMessage.length()  0) {
 throw new IOException(errorMessage);
 }

 return processReader.getResult();
 }

 static class ProcessReader extends Thread {
 private InputStream in;
 private byte[] result;

 ProcessReader(InputStream in) {
 this.in = in;
 }

 synchronized byte[] getResult() {
 while(isAlive()) {
 try {
 wait();

 } catch(InterruptedException ex) {
 System.out.println(Exception:  + ex);
 }
 }

 return result;
 }

 public void run() {
 int avail = 0;
 byte[] buf = new byte[0x1];


 ByteArrayOutputStream baos = new ByteArrayOutputStream();

 while(true) {
 try {
 int count = in.read(buf);

 if(count == -1) {

 baos.close();

 result = baos.toByteArray();

 baos = null;
 return;
 }

 baos.write(buf, 0, count);

 } catch(IOException ex) {
 System.out.println(Exception:  + ex);
 }
 }

 }

 }

}


On Friday, June 14, 2002, at 12:15 AM, morpheus Smith wrote:

 That's what exactly i'm looking for.(actullay was
 planning to write).
 If you could send that , that would be a great help
 for me.
 thanks a lot.
 i appreciate your prompt reply.

 thanks
 morpheus


 --- David Teran [EMAIL PROTECTED] wrote:
 yes, try imagemagick. If someone is interested, we
 have written a wrapper that makes runtime calls and
 converts images on the fly.

 regards david

 On Thursday, June 13, 2002, at 11:41 PM, morpheus
 Smith wrote:

 Gif images created from photoshop, gimp and
 photoeditor are not directly supported by iText
 b'cos
 of gif standards. is there free tool available by
 which i can create gifs supported by iText.

 Thanks in advance.
 -- morphues

 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com