Re: [iText-questions] Varied Results

2010-02-23 Thread 1T3XT info
Jonathan Logue wrote:
> Has anyone had a situation where the output when printing an iText generated 
> PDF from one computer had a different result than another computer. Before I 
> even get into the specifics of the implementation, I am just curious if this 
> is even possible. Could instructions be interpreted differently by different 
> Reader instances? In our situation, text appears 1/4 of an inch, or so, off.

Two obvious counter-questions:
Were the fonts embedded?
What are the scaling settings in the print dialog?
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Khadikar, Rahul
Thanks klas!!!

 

  _  

From: Klas Lindbäck [mailto:klas.lindb...@val.se] 
Sent: Tuesday, February 23, 2010 3:43 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] After rotation, images are getting displced
in iText PDF

 

Images are not rotated around their center. The coordinate of the rotation
pivot is (0, 0). If you rotate something, you have to watch out that it is
not rotated 'off' your page. you may have to perform a translation to keep
the object on the page.

/Klas


rhul_rk skrev 20:59: 

 
Hi,
 
It's very urgent. We need help in this. Looking towards positive support.
 
 
 
 
  

 

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Varied Results

2010-02-23 Thread Jonathan Logue
Has anyone had a situation where the output when printing an iText generated 
PDF from one computer had a different result than another computer. Before I 
even get into the specifics of the implementation, I am just curious if this is 
even possible. Could instructions be interpreted differently by different 
Reader instances? In our situation, text appears 1/4 of an inch, or so, off.

Thanks!

Jonathan Logue

-Original Message-
From: itext-questions-requ...@lists.sourceforge.net
[mailto:itext-questions-requ...@lists.sourceforge.net]
Sent: Tuesday, February 23, 2010 3:41 PM
To: itext-questions@lists.sourceforge.net
Subject: iText-questions Digest, Vol 45, Issue 101


Send iText-questions mailing list submissions to
itext-questions@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/itext-questions
or, via email, send a message with subject or body 'help' to
itext-questions-requ...@lists.sourceforge.net

You can reach the person managing the list at
itext-questions-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of iText-questions digest..."


Today's Topics:

   1. Re: Re   tain DuplexMode property (vdunkin)
   2. Re: Using Images extracted from a pdf (Fernando Gomes)
   3. Re: Re   tain DuplexMode property (vdunkin)
   4. Re: Using Images extracted from a pdf (Leonard Rosenthol)


--

Message: 1
Date: Tue, 23 Feb 2010 13:02:55 -0800 (PST)
From: vdunkin 
Subject: Re: [iText-questions] Re   tain DuplexMode property
To: itext-questions@lists.sourceforge.net
Message-ID: <27710454.p...@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


I got it working. I had to set the pdfReader to appendable as well as the
pdfStamper to appendable.

-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27710454.html
Sent from the iText - General mailing list archive at Nabble.com.




--

Message: 2
Date: Tue, 23 Feb 2010 13:06:44 -0800 (PST)
From: Fernando Gomes 
Subject: Re: [iText-questions] Using Images extracted from a pdf
To: itext-questions@lists.sourceforge.net
Message-ID: <27710517.p...@talk.nabble.com>
Content-Type: text/plain; charset=UTF-8


i not want to transforme my pages in image..

its so..
i will extract de text of my pdf..
its be easy..

and in same action.. i will extract all images from this pdf..
apply OCR in images.. for extract text of each image.

so ...
i need so much to get all images into the pdf..
i won to take the byte raw of image..
now need transform that in a valid JAVA.AWT.IMAGE OR BUFFEREDIMAGE

Mike Marchywka-2 wrote:
> 
> 
> 
> 
> 
> You can always use the command line tool in pdf toolkit or xpf, 
> I can't remember which but there is something like
> pdf2image similar to pdf2text to extract text.
> 
> 
> 
> 
> 
> 
> 
> 
>> Date: Tue, 23 Feb 2010 12:43:28 -0800
>> From: fernandogomes...@hotmail.com
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>
>>
>> I'm going crazy with it. as you can see, I never manipulated images as
>> low
>> level. and do not have much sense of how things work. I am searching for
>> a
>> days for end my solution. and I'm already getting stressed.
>> i going on test methods .. i try to do.. and before try by another
>> choice..
>> -.-
>>
>> can you give me some more assistance on how I can turn this array of
>> bytes
>> back into an image?
>>
>> could have just one class of api that made it not? : P
>>
>> Pdfimages buf = new pdfimages (myRawImageByteArray);
>> buf.getAsBufferedImage ();
>>
>> : P
>>
>> if you say you can not help me all right, but I can indicate a content in
>> which I can rely on to get this done?
>>
>> thanks.
>>
>>
>> Leonard Rosenthol-3 wrote:
>>>
>>> The image is decompressed and then "injected" into the PDF. Same with
>>> EVERY TYPE of image EXCEPT JPEG.
>>>
>>> -Original Message-
>>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
>>> Sent: Tuesday, February 23, 2010 3:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>>
>>>
>>> ty ..
>>>
>>> I have a question.
>>> when I insert an image that is not jpeg
>>> what exactly happens with this?
>>>
>>> say that it is in PNG it is decompressed to be "injected" into PDF?
>>>
>>> or she keeps your PNG format, but the bytes are encoded with the
>>> FlateEncode
>>> ..
>>>
>>> a matter of finding the filter and decode do I get it.
>>>
>>> and if the image is uncompressed before being inserted to PDF, how do I
>>> know
>>> which type of encode the image?
>>>
>>>
>>> Leonard Rosenthol-3 wrote:

 Bits per pixel is the BitsPerComponent value in the image object

 Pixels pe

Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Leonard Rosenthol
Text extraction is difficult too - it just so happens that someone has written 
the code already and contributed it back, so that you can take advantage of it. 
 Before then, it was quite a nightmare.

Now you have a requirement (for your job, I assume) and the code doesn't exist 
so you need to write it.  If you are unable to do so, due to lack of knowledge, 
time, etc. then perhaps your company should consider hiring iText Software to 
write it for you.  I am sure they would be glad to it - and in less time than 
you've already spent.

The alternative - and there isn't any shortcut - is for you to learn about PDF 
and image formats...

Leonard

-Original Message-
From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
Sent: Tuesday, February 23, 2010 4:07 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Using Images extracted from a pdf


i not want to transforme my pages in image..

its so..
i will extract de text of my pdf..
its be easy..

and in same action.. i will extract all images from this pdf..
apply OCR in images.. for extract text of each image.

so ...
i need so much to get all images into the pdf..
i won to take the byte raw of image..
now need transform that in a valid JAVA.AWT.IMAGE OR BUFFEREDIMAGE

Mike Marchywka-2 wrote:
>
>
>
>
>
> You can always use the command line tool in pdf toolkit or xpf,
> I can't remember which but there is something like
> pdf2image similar to pdf2text to extract text.
>
>
>
>
>
>
>
> 
>> Date: Tue, 23 Feb 2010 12:43:28 -0800
>> From: fernandogomes...@hotmail.com
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>
>>
>> I'm going crazy with it. as you can see, I never manipulated images as
>> low
>> level. and do not have much sense of how things work. I am searching for
>> a
>> days for end my solution. and I'm already getting stressed.
>> i going on test methods .. i try to do.. and before try by another
>> choice..
>> -.-
>>
>> can you give me some more assistance on how I can turn this array of
>> bytes
>> back into an image?
>>
>> could have just one class of api that made it not? : P
>>
>> Pdfimages buf = new pdfimages (myRawImageByteArray);
>> buf.getAsBufferedImage ();
>>
>> : P
>>
>> if you say you can not help me all right, but I can indicate a content in
>> which I can rely on to get this done?
>>
>> thanks.
>>
>>
>> Leonard Rosenthol-3 wrote:
>>>
>>> The image is decompressed and then "injected" into the PDF. Same with
>>> EVERY TYPE of image EXCEPT JPEG.
>>>
>>> -Original Message-
>>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
>>> Sent: Tuesday, February 23, 2010 3:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>>
>>>
>>> ty ..
>>>
>>> I have a question.
>>> when I insert an image that is not jpeg
>>> what exactly happens with this?
>>>
>>> say that it is in PNG it is decompressed to be "injected" into PDF?
>>>
>>> or she keeps your PNG format, but the bytes are encoded with the
>>> FlateEncode
>>> ..
>>>
>>> a matter of finding the filter and decode do I get it.
>>>
>>> and if the image is uncompressed before being inserted to PDF, how do I
>>> know
>>> which type of encode the image?
>>>
>>>
>>> Leonard Rosenthol-3 wrote:

 Bits per pixel is the BitsPerComponent value in the image object

 Pixels per line (POR LINHA) is _NOT_ Width * bits. It's Width *
 NumComponents, where NumComponents is based on the colorspace in
 question
 (eg. RGB == 3, CMYK == 4).

 -Original Message-
 From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
 Sent: Tuesday, February 23, 2010 2:00 PM
 To: itext-questions@lists.sourceforge.net
 Subject: Re: [iText-questions] Using Images extracted from a pdf




> public static BufferedImage createBufferedImageFromRawBytes(byte[]
> bytes,int width, int height, int bits) throws BadElementException,
> MalformedURLException, IOException {
> com.lowagie.text.Image img =
> com.lowagie.text.Image.getInstance(bytes);
>
> DataBuffer db = new DataBufferByte (img.getRawData(),
> img.getRawData().length);
>
> WritableRaster raster = Raster.createPackedRaster(db, //DATA BUFFER
> width, //LARGURA
> height, //ALTURA
> width*bits, //LARGURA * BITS POR PIXEL = PIXEL POR
> LINHA
> ->scanlineStride
> // bits, //BITS POR PIXEL ->pixelStride
> new int [] {bits},
>
> null);
>
> ColorSpace cs = ColorSpace.getInstance (img.getColorspace());
> ColorModel cm = new ComponentColorModel(cs, false, false,
> Transparency.OPAQUE, db.getDataType());
> BufferedImage bi = new BufferedImage (cm, raster, false, null);
> return null;
> }
>
>

 this code is up to where I could get, but there are variables that I
 know
 of

Re: [iText-questions] Re tain DuplexMode property

2010-02-23 Thread vdunkin

I've narrowed down the issue a little more. When I remove the following lines
of code, the duplexMode is retained.

pdfStamper.addViewerPreference(PdfName.HIDETOOLBAR, pdfBoolean);
pdfStamper.addViewerPreference(PdfName.FITWINDOW, pdfBoolean);

It seems adding additional viewer preferences overwrites the original
preferences.

I am not attaching the before and after pdf's. The after pdf has
confidential information. If you really want to look at both, let me know
and I will strip the confidential info out.
-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27710732.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Fernando Gomes

i not want to transforme my pages in image..

its so..
i will extract de text of my pdf..
its be easy..

and in same action.. i will extract all images from this pdf..
apply OCR in images.. for extract text of each image.

so ...
i need so much to get all images into the pdf..
i won to take the byte raw of image..
now need transform that in a valid JAVA.AWT.IMAGE OR BUFFEREDIMAGE

Mike Marchywka-2 wrote:
> 
> 
> 
> 
> 
> You can always use the command line tool in pdf toolkit or xpf, 
> I can't remember which but there is something like
> pdf2image similar to pdf2text to extract text.
> 
> 
> 
> 
> 
> 
> 
> 
>> Date: Tue, 23 Feb 2010 12:43:28 -0800
>> From: fernandogomes...@hotmail.com
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>
>>
>> I'm going crazy with it. as you can see, I never manipulated images as
>> low
>> level. and do not have much sense of how things work. I am searching for
>> a
>> days for end my solution. and I'm already getting stressed.
>> i going on test methods .. i try to do.. and before try by another
>> choice..
>> -.-
>>
>> can you give me some more assistance on how I can turn this array of
>> bytes
>> back into an image?
>>
>> could have just one class of api that made it not? : P
>>
>> Pdfimages buf = new pdfimages (myRawImageByteArray);
>> buf.getAsBufferedImage ();
>>
>> : P
>>
>> if you say you can not help me all right, but I can indicate a content in
>> which I can rely on to get this done?
>>
>> thanks.
>>
>>
>> Leonard Rosenthol-3 wrote:
>>>
>>> The image is decompressed and then "injected" into the PDF. Same with
>>> EVERY TYPE of image EXCEPT JPEG.
>>>
>>> -Original Message-
>>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
>>> Sent: Tuesday, February 23, 2010 3:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>>
>>>
>>> ty ..
>>>
>>> I have a question.
>>> when I insert an image that is not jpeg
>>> what exactly happens with this?
>>>
>>> say that it is in PNG it is decompressed to be "injected" into PDF?
>>>
>>> or she keeps your PNG format, but the bytes are encoded with the
>>> FlateEncode
>>> ..
>>>
>>> a matter of finding the filter and decode do I get it.
>>>
>>> and if the image is uncompressed before being inserted to PDF, how do I
>>> know
>>> which type of encode the image?
>>>
>>>
>>> Leonard Rosenthol-3 wrote:

 Bits per pixel is the BitsPerComponent value in the image object

 Pixels per line (POR LINHA) is _NOT_ Width * bits. It's Width *
 NumComponents, where NumComponents is based on the colorspace in
 question
 (eg. RGB == 3, CMYK == 4).

 -Original Message-
 From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
 Sent: Tuesday, February 23, 2010 2:00 PM
 To: itext-questions@lists.sourceforge.net
 Subject: Re: [iText-questions] Using Images extracted from a pdf




> public static BufferedImage createBufferedImageFromRawBytes(byte[]
> bytes,int width, int height, int bits) throws BadElementException,
> MalformedURLException, IOException {
> com.lowagie.text.Image img =
> com.lowagie.text.Image.getInstance(bytes);
>
> DataBuffer db = new DataBufferByte (img.getRawData(),
> img.getRawData().length);
>
> WritableRaster raster = Raster.createPackedRaster(db, //DATA BUFFER
> width, //LARGURA
> height, //ALTURA
> width*bits, //LARGURA * BITS POR PIXEL = PIXEL POR
> LINHA
> ->scanlineStride
> // bits, //BITS POR PIXEL ->pixelStride
> new int [] {bits},
>
> null);
>
> ColorSpace cs = ColorSpace.getInstance (img.getColorspace());
> ColorModel cm = new ComponentColorModel(cs, false, false,
> Transparency.OPAQUE, db.getDataType());
> BufferedImage bi = new BufferedImage (cm, raster, false, null);
> return null;
> }
>
>

 this code is up to where I could get, but there are variables that I
 know
 of
 to generate bufferedImage, please someone help me see if I'm on track.
 If I write something wrong.



 Fernando Gomes wrote:
>
> can anyone help-me one more time..
> i dont know what i do ..
>
> I need to get the image bytes, now decoded...
>
> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>> String filter = pdfStrem.get(PdfName.FILTER).toString();
>> int bits =
>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>> int width =
>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>> int height =
>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>> PdfDictionary param =
>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>> int colors =
>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>> int predictor

Re: [iText-questions] Re tain DuplexMode property

2010-02-23 Thread vdunkin

I got it working. I had to set the pdfReader to appendable as well as the
pdfStamper to appendable.

-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27710454.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Mike Marchywka




You can always use the command line tool in pdf toolkit or xpf, 
I can't remember which but there is something like
pdf2image similar to pdf2text to extract text.








> Date: Tue, 23 Feb 2010 12:43:28 -0800
> From: fernandogomes...@hotmail.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Using Images extracted from a pdf
>
>
> I'm going crazy with it. as you can see, I never manipulated images as low
> level. and do not have much sense of how things work. I am searching for a
> days for end my solution. and I'm already getting stressed.
> i going on test methods .. i try to do.. and before try by another choice..
> -.-
>
> can you give me some more assistance on how I can turn this array of bytes
> back into an image?
>
> could have just one class of api that made it not? : P
>
> Pdfimages buf = new pdfimages (myRawImageByteArray);
> buf.getAsBufferedImage ();
>
> : P
>
> if you say you can not help me all right, but I can indicate a content in
> which I can rely on to get this done?
>
> thanks.
>
>
> Leonard Rosenthol-3 wrote:
>>
>> The image is decompressed and then "injected" into the PDF. Same with
>> EVERY TYPE of image EXCEPT JPEG.
>>
>> -Original Message-
>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
>> Sent: Tuesday, February 23, 2010 3:21 PM
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>
>>
>> ty ..
>>
>> I have a question.
>> when I insert an image that is not jpeg
>> what exactly happens with this?
>>
>> say that it is in PNG it is decompressed to be "injected" into PDF?
>>
>> or she keeps your PNG format, but the bytes are encoded with the
>> FlateEncode
>> ..
>>
>> a matter of finding the filter and decode do I get it.
>>
>> and if the image is uncompressed before being inserted to PDF, how do I
>> know
>> which type of encode the image?
>>
>>
>> Leonard Rosenthol-3 wrote:
>>>
>>> Bits per pixel is the BitsPerComponent value in the image object
>>>
>>> Pixels per line (POR LINHA) is _NOT_ Width * bits. It's Width *
>>> NumComponents, where NumComponents is based on the colorspace in question
>>> (eg. RGB == 3, CMYK == 4).
>>>
>>> -Original Message-
>>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com]
>>> Sent: Tuesday, February 23, 2010 2:00 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>>
>>>
>>>
>>>
 public static BufferedImage createBufferedImageFromRawBytes(byte[]
 bytes,int width, int height, int bits) throws BadElementException,
 MalformedURLException, IOException {
 com.lowagie.text.Image img =
 com.lowagie.text.Image.getInstance(bytes);

 DataBuffer db = new DataBufferByte (img.getRawData(),
 img.getRawData().length);

 WritableRaster raster = Raster.createPackedRaster(db, //DATA BUFFER
 width, //LARGURA
 height, //ALTURA
 width*bits, //LARGURA * BITS POR PIXEL = PIXEL POR
 LINHA
 ->scanlineStride
 // bits, //BITS POR PIXEL ->pixelStride
 new int [] {bits},

 null);

 ColorSpace cs = ColorSpace.getInstance (img.getColorspace());
 ColorModel cm = new ComponentColorModel(cs, false, false,
 Transparency.OPAQUE, db.getDataType());
 BufferedImage bi = new BufferedImage (cm, raster, false, null);
 return null;
 }


>>>
>>> this code is up to where I could get, but there are variables that I know
>>> of
>>> to generate bufferedImage, please someone help me see if I'm on track.
>>> If I write something wrong.
>>>
>>>
>>>
>>> Fernando Gomes wrote:

 can anyone help-me one more time..
 i dont know what i do ..

 I need to get the image bytes, now decoded...

 String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
> String filter = pdfStrem.get(PdfName.FILTER).toString();
> int bits =
> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
> int width =
> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
> int height =
> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
> PdfDictionary param =
> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
> int colors =
> Integer.valueOf(param.get(PdfName.COLORS).toString());
> int predictor =
> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
> int colums =
> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
> if(filter.equals("/FlateDecode"))
> {
> byte[] bytesDecod = PdfReader.FlateDecode(bytes);

 these are all the information that I can withdraw PDF

 I have to do to create my image in general ..
 I'm trying to do, or learn, but this hard, all my attempts have failed.
 ty


 Fernando Gomes wrote:
>
> Sirs, really sorry for duplicating, can delete other topics ?
> so sorry ..:blush:
>>>

Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Fernando Gomes

I'm going crazy with it. as you can see, I never manipulated images as low
level. and do not have much sense of how things work. I am searching for a
days for end my solution. and I'm already getting stressed.
i going on test methods .. i try to do.. and before try by another choice..
-.-

can you give me some more assistance on how I can turn this array of bytes
back into an image?

 could have just one class of api that made it not? : P

Pdfimages buf = new pdfimages (myRawImageByteArray);
buf.getAsBufferedImage ();

: P

if you say you can not help me all right, but I can indicate a content in
which I can rely on to get this done?

thanks.


Leonard Rosenthol-3 wrote:
> 
> The image is decompressed and then "injected" into the PDF.  Same with
> EVERY TYPE of image EXCEPT JPEG.
> 
> -Original Message-
> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
> Sent: Tuesday, February 23, 2010 3:21 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Using Images extracted from a pdf
> 
> 
> ty ..
> 
> I have a question.
> when I insert an image that is not jpeg
> what exactly happens with this?
> 
> say that it is in PNG it is decompressed to be "injected" into PDF?
> 
> or she keeps your PNG format, but the bytes are encoded with the
> FlateEncode
> ..
> 
> a matter of finding the filter and decode do I get it.
> 
> and if the image is uncompressed before being inserted to PDF, how do I
> know
> which type of encode the image?
> 
> 
> Leonard Rosenthol-3 wrote:
>> 
>> Bits per pixel is the BitsPerComponent value in the image object
>> 
>> Pixels per line (POR LINHA) is _NOT_ Width * bits.  It's Width *
>> NumComponents, where NumComponents is based on the colorspace in question
>> (eg. RGB == 3, CMYK == 4).
>> 
>> -Original Message-
>> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
>> Sent: Tuesday, February 23, 2010 2:00 PM
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>> 
>> 
>> 
>> 
>>>  public static BufferedImage createBufferedImageFromRawBytes(byte[]
>>> bytes,int width, int height, int bits) throws BadElementException,
>>> MalformedURLException, IOException {
>>>   com.lowagie.text.Image img =
>>> com.lowagie.text.Image.getInstance(bytes);
>>>   
>>> DataBuffer db = new DataBufferByte (img.getRawData(),
>>> img.getRawData().length);
>>> 
>>> WritableRaster raster = Raster.createPackedRaster(db, 
>>> //DATA BUFFER 
>>> 
>>> width, //LARGURA
>>> 
>>> height, //ALTURA
>>> 
>>> width*bits, 
>>> //LARGURA * BITS POR PIXEL = PIXEL POR
>>> LINHA
>>> ->scanlineStride 
>>> //  
>>> bits, //BITS POR 
>>> PIXEL  ->pixelStride
>>> 
>>> new int [] {bits}, 
>>> 
>>> 
>>> 
>>> null);
>>> 
>>> ColorSpace cs = ColorSpace.getInstance 
>>> (img.getColorspace());
>>> ColorModel  cm = new ComponentColorModel(cs, false, 
>>> false,
>>> Transparency.OPAQUE, db.getDataType());
>>> BufferedImage bi = new BufferedImage (cm, raster, 
>>> false, null); 
>>>   return null;
>>>   }
>>> 
>>> 
>> 
>> this code is up to where I could get, but there are variables that I know
>> of
>> to generate bufferedImage, please someone help me see if I'm on track.
>> If I write something wrong.
>> 
>> 
>> 
>> Fernando Gomes wrote:
>>> 
>>> can anyone help-me one more time..
>>> i dont know what i do ..
>>> 
>>> I need to get the image bytes, now decoded...
>>> 
>>> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
String 
 filter = pdfStrem.get(PdfName.FILTER).toString();
int 
 bits =
 Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
int 
 width =
 Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString())

Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Leonard Rosenthol
The image is decompressed and then "injected" into the PDF.  Same with EVERY 
TYPE of image EXCEPT JPEG.

-Original Message-
From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
Sent: Tuesday, February 23, 2010 3:21 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Using Images extracted from a pdf


ty ..

I have a question.
when I insert an image that is not jpeg
what exactly happens with this?

say that it is in PNG it is decompressed to be "injected" into PDF?

or she keeps your PNG format, but the bytes are encoded with the FlateEncode
..

a matter of finding the filter and decode do I get it.

and if the image is uncompressed before being inserted to PDF, how do I know
which type of encode the image?


Leonard Rosenthol-3 wrote:
> 
> Bits per pixel is the BitsPerComponent value in the image object
> 
> Pixels per line (POR LINHA) is _NOT_ Width * bits.  It's Width *
> NumComponents, where NumComponents is based on the colorspace in question
> (eg. RGB == 3, CMYK == 4).
> 
> -Original Message-
> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
> Sent: Tuesday, February 23, 2010 2:00 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Using Images extracted from a pdf
> 
> 
> 
> 
>>  public static BufferedImage createBufferedImageFromRawBytes(byte[]
>> bytes,int width, int height, int bits) throws BadElementException,
>> MalformedURLException, IOException {
>>com.lowagie.text.Image img =
>> com.lowagie.text.Image.getInstance(bytes);
>>
>>  DataBuffer db = new DataBufferByte (img.getRawData(),
>> img.getRawData().length);
>>  
>>  WritableRaster raster = Raster.createPackedRaster(db, 
>> //DATA BUFFER 
>>  
>> width, //LARGURA
>>  
>> height, //ALTURA
>>  
>> width*bits, 
>> //LARGURA * BITS POR PIXEL = PIXEL POR LINHA
>> ->scanlineStride 
>> //   
>> bits, //BITS POR 
>> PIXEL  ->pixelStride
>>  
>> new int [] {bits}, 
>>  
>> 
>>  
>> null);
>>  
>>  ColorSpace cs = ColorSpace.getInstance 
>> (img.getColorspace());
>>  ColorModel  cm = new ComponentColorModel(cs, false, 
>> false,
>> Transparency.OPAQUE, db.getDataType());
>>  BufferedImage bi = new BufferedImage (cm, raster, 
>> false, null); 
>>return null;
>>}
>> 
>> 
> 
> this code is up to where I could get, but there are variables that I know
> of
> to generate bufferedImage, please someone help me see if I'm on track.
> If I write something wrong.
> 
> 
> 
> Fernando Gomes wrote:
>> 
>> can anyone help-me one more time..
>> i dont know what i do ..
>> 
>> I need to get the image bytes, now decoded...
>> 
>> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>>> String 
>>> filter = pdfStrem.get(PdfName.FILTER).toString();
>>> int 
>>> bits =
>>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>>> int 
>>> width =
>>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>>> int 
>>> height =
>>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>>> 
>>> PdfDictionary param =
>>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>>> int 
>>> colors =
>>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>>> int 
>>> predictor =
>>> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
>>> int 
>>> colums =
>>> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
>>>  

Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Fernando Gomes

ty ..

I have a question.
when I insert an image that is not jpeg
what exactly happens with this?

say that it is in PNG it is decompressed to be "injected" into PDF?

or she keeps your PNG format, but the bytes are encoded with the FlateEncode
..

a matter of finding the filter and decode do I get it.

and if the image is uncompressed before being inserted to PDF, how do I know
which type of encode the image?


Leonard Rosenthol-3 wrote:
> 
> Bits per pixel is the BitsPerComponent value in the image object
> 
> Pixels per line (POR LINHA) is _NOT_ Width * bits.  It's Width *
> NumComponents, where NumComponents is based on the colorspace in question
> (eg. RGB == 3, CMYK == 4).
> 
> -Original Message-
> From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
> Sent: Tuesday, February 23, 2010 2:00 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Using Images extracted from a pdf
> 
> 
> 
> 
>>  public static BufferedImage createBufferedImageFromRawBytes(byte[]
>> bytes,int width, int height, int bits) throws BadElementException,
>> MalformedURLException, IOException {
>>com.lowagie.text.Image img =
>> com.lowagie.text.Image.getInstance(bytes);
>>
>>  DataBuffer db = new DataBufferByte (img.getRawData(),
>> img.getRawData().length);
>>  
>>  WritableRaster raster = Raster.createPackedRaster(db, 
>> //DATA BUFFER 
>>  
>> width, //LARGURA
>>  
>> height, //ALTURA
>>  
>> width*bits, 
>> //LARGURA * BITS POR PIXEL = PIXEL POR LINHA
>> ->scanlineStride 
>> //   
>> bits, //BITS POR 
>> PIXEL  ->pixelStride
>>  
>> new int [] {bits}, 
>>  
>> 
>>  
>> null);
>>  
>>  ColorSpace cs = ColorSpace.getInstance 
>> (img.getColorspace());
>>  ColorModel  cm = new ComponentColorModel(cs, false, 
>> false,
>> Transparency.OPAQUE, db.getDataType());
>>  BufferedImage bi = new BufferedImage (cm, raster, 
>> false, null); 
>>return null;
>>}
>> 
>> 
> 
> this code is up to where I could get, but there are variables that I know
> of
> to generate bufferedImage, please someone help me see if I'm on track.
> If I write something wrong.
> 
> 
> 
> Fernando Gomes wrote:
>> 
>> can anyone help-me one more time..
>> i dont know what i do ..
>> 
>> I need to get the image bytes, now decoded...
>> 
>> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>>> String 
>>> filter = pdfStrem.get(PdfName.FILTER).toString();
>>> int 
>>> bits =
>>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>>> int 
>>> width =
>>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>>> int 
>>> height =
>>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>>> 
>>> PdfDictionary param =
>>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>>> int 
>>> colors =
>>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>>> int 
>>> predictor =
>>> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
>>> int 
>>> colums =
>>> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
>>> 
>>> if(filter.equals("/FlateDecode"))
>>> {
>>> 
>>> byte[] bytesDecod = PdfReader.FlateDecode(bytes);
>> 
>> these are all the information that I can withdraw PDF
>> 
>>

Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Leonard Rosenthol
Bits per pixel is the BitsPerComponent value in the image object

Pixels per line (POR LINHA) is _NOT_ Width * bits.  It's Width * NumComponents, 
where NumComponents is based on the colorspace in question (eg. RGB == 3, CMYK 
== 4).

-Original Message-
From: Fernando Gomes [mailto:fernandogomes...@hotmail.com] 
Sent: Tuesday, February 23, 2010 2:00 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Using Images extracted from a pdf




>  public static BufferedImage createBufferedImageFromRawBytes(byte[]
> bytes,int width, int height, int bits) throws BadElementException,
> MalformedURLException, IOException {
> com.lowagie.text.Image img =
> com.lowagie.text.Image.getInstance(bytes);
> 
>   DataBuffer db = new DataBufferByte (img.getRawData(),
> img.getRawData().length);
>   
>   WritableRaster raster = Raster.createPackedRaster(db, 
> //DATA BUFFER 
>   
> width, //LARGURA
>   
> height, //ALTURA
>   
> width*bits, //LARGURA 
> * BITS POR PIXEL = PIXEL POR LINHA
> ->scanlineStride 
> //
> bits, //BITS POR 
> PIXEL  ->pixelStride
>   
> new int [] {bits}, 
>   
> 
>   
> null);
>   
>   ColorSpace cs = ColorSpace.getInstance 
> (img.getColorspace());
>   ColorModel  cm = new ComponentColorModel(cs, false, 
> false,
> Transparency.OPAQUE, db.getDataType());
>   BufferedImage bi = new BufferedImage (cm, raster, 
> false, null); 
> return null;
> }
> 
> 

this code is up to where I could get, but there are variables that I know of
to generate bufferedImage, please someone help me see if I'm on track.
If I write something wrong.



Fernando Gomes wrote:
> 
> can anyone help-me one more time..
> i dont know what i do ..
> 
> I need to get the image bytes, now decoded...
> 
> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>>  String 
>> filter = pdfStrem.get(PdfName.FILTER).toString();
>>  int 
>> bits =
>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>>  int 
>> width =
>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>>  int 
>> height =
>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>>  
>> PdfDictionary param =
>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>>  int 
>> colors =
>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>>  int 
>> predictor =
>> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
>>  int 
>> colums =
>> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
>>  
>> if(filter.equals("/FlateDecode"))
>>  {
>>  
>> byte[] bytesDecod = PdfReader.FlateDecode(bytes);
> 
> these are all the information that I can withdraw PDF
> 
> I have to do to create my image in general ..
> I'm trying to do, or learn, but this hard, all my attempts have failed.
> ty
> 
> 
> Fernando Gomes wrote:
>> 
>> Sirs, really sorry for duplicating, can delete other topics ?
>> so sorry ..:blush:
>> 
>> very thkx for help..
>> and so good fast help ..
>> i will estudy more ..
>> 
>> 
>> Leonard Rosenthol-3 wrote:
>>> 
>>> You are assuming that PDF maintains the PNG nature of the image - that
>>> is NOT the case.  PDF only supports two kinds of images JPEG (which is
>>> why this works) an

Re: [iText-questions] Re tain DuplexMode property

2010-02-23 Thread Leonard Rosenthol
Perhaps you should provide before & after PDFs to look at...

-Original Message-
From: vdunkin [mailto:vdun...@dhs.state.or.us] 
Sent: Tuesday, February 23, 2010 12:46 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Re tain DuplexMode property


I must doing something wrong, because the following doesn't work 

pdfStamper = new PdfStamper(pdfReader, out, version, true);

pdfReader is the pdf I'm reading in
out is the outputstream I'm sending to a browser
the version is set to 1.7

Any ideas?


Leonard Rosenthol-3 wrote:
> 
> As long as you stamp in "append" mode,, it should be fine.
> 
> -Original Message-
> From: vdunkin [mailto:vdun...@dhs.state.or.us] 
> Sent: Tuesday, February 23, 2010 11:35 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Re tain DuplexMode property
> 
> 
> I am using PdfReader to read in an existing pdf form, then using
> PdfStamper
> to fill the form. The existing pdf has document properties on the advanced
> tab under print dialog presets that specify DuplexMode. I would like to
> retain the settings of the original form so that if the form specifies
> 'Duplex Flip Long Edge' or 'Simplex' my resulting pdf has these
> properties.
> Is there a way to do this? I am specifying pdf v1.7 when creating the
> stamper.
> -- 
> View this message in context:
> http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27706214.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27707327.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Page is rotated after being scaled

2010-02-23 Thread Valentin Avksentyev
I'm using the following code to scale PDF pages down to 8.5x11, however, for 
some PDFs the page ends up being rotated 90 degrees after being scaled.  One 
more detail, PDFs that are rotated seem to be created by scanners.

Here is part of the relevant part of the code that I use:

PdfContentByte cb = writer.getDirectContent();
PdfImportedPage page = writer.getImportedPage(reader, i);
com.lowagie.text.Image image = com.lowagie.text.Image.getInstance(page);
Rectangle psize = reader.getPageSize(i);
float area = psize.getHeight() * psize.getWidth();
float areaDiffPercent = (letterArea / area) * 100;
image.setAbsolutePosition(10, 20);
cb.addImage(image)image.scalePercent(areaDiffPercent);

Any help is appreciated

Best,
-Val
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText program not works to change to a new itext.jar version

2010-02-23 Thread 1T3XT info
NikoBarna wrote:
> It's compiling without errors!!

Not with iText 5.0.1 you aren't!

> it's headershooter deprecated in new version?

HeaderFooter was REMOVED in 5.0.0 and 5.0.1.
Therefore it's impossible that you can compile without errors.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText program not works to change to a new itext.jar version

2010-02-23 Thread NikoBarna

It's compiling without errors!!

it's headershooter deprecated in new version?


1T3XT info wrote:
> 
> NikoBarna wrote:
>> I have a programm wich creates a pdf , in the header of the page puts a
>> corporative image and some data to the right. This programm works fine
>> when
>> i was ussing itext 2.3.jar, but now, i have tried with itext 5.1.jar and
>> not
>> works, the imageLogo is not showed... i don't know why...
> 
> Your code shouldn't even compile!
> Table has been removed, you should switch to PdfPTable.
> -- 
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

-- 
View this message in context: 
http://old.nabble.com/iText-program-not-works-to-change-to-a-new-itext.jar-version-tp27701829p27706758.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Filling UP Pdf forms Using ItextSharp --- Adobe Read Out LOud not working for Forms input field.

2010-02-23 Thread SPIF

any Updates


SPIF wrote:
> 
> I have attached the file
> 
> 
> Mark Storer-2 wrote:
>> 
>> PPYP.  Please Post Your PDF.
>> 
>> --Mark Storer 
>>   Senior Software Engineer 
>>   Cardiff.com
>> 
>> #include  
>> typedef std::Disclaimer DisCard; 
>> 
>> 
>> 
>>> -Original Message-
>>> From: SPIF [mailto:roja...@hotmail.com]
>>> Sent: Sunday, February 14, 2010 9:13 AM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: Re: [iText-questions] Filling UP Pdf forms Using 
>>> ItextSharp ---
>>> Adobe Read Out LOud not working for Forms input field.
>>> 
>>> 
>>> 
>>> yes it does read the text on the PDF form before and after i 
>>> add it. the only
>>> thing it doesn't read is the Text that i added to the pdf 
>>> form in input
>>> controls.
>>> 
>>> 
>>> Leonard Rosenthol-3 wrote:
>>> > 
>>> > Does Read Out Loud work before you add the extra stuff?  
>>> What version of
>>> > Acrobat or Reader are you working with?  Can you post the 
>>> problematic PDF?
>>> > 
>>> > -Original Message-
>>> > From: SPIF [mailto:roja...@hotmail.com] 
>>> > Sent: Friday, February 12, 2010 2:05 PM
>>> > To: itext-questions@lists.sourceforge.net
>>> > Subject: [iText-questions] Filling UP Pdf forms Using 
>>> ItextSharp --- Adobe
>>> > Read Out LOud not working for Forms input field.
>>> > 
>>> > 
>>> > i'm using ITextsharp to fill the pdf file . the Adobe 
>>> View-->Read Out loud
>>> > function doesn;t read the text that i have added to the pdf 
>>> forms. how can
>>> > i
>>> > make this pdf form accessible when i fill this pdf file.
>>> > 
>>> > Here is the C# code i'm using
>>> > 
>>> > string  formFile = @"c:\PsTools\testing.pdf" ; 
>>> >  string  newFile = @"c:\PsTools\Report.pdf" ; 
>>> > PdfReader reader = new  PdfReader(formFile); 
>>> >  PdfStamper stamper = new  PdfStamper(reader,new  
>>> FileStream(newFile,
>>> > FileMode.Create));  AcroFields fields = 
>>> stamper.AcroFields;   
>>> >   // set form fields  
>>> >  fields.SetField("Date" , "02/04/2010" );  
>>> fields.SetField("Time" ,
>>> > "15:02" );
>>> >   fields.SetField("details" , "Some details" );
>>> >   fields.SetField(" http://old.nabble.com/file/p27613481/test.pdf
>>> test.pdf " , "New detail" );  
>>> >   // set document info  
>>> >  Hashtable info = new  Hashtable();  
>>> >  info["Title" ] = "Modified Form" ; 
>>> >   info["Author" ] = "Dolly" ;  
>>> >  info["Creator" ] = "My Web App" ;
>>> >stamper.MoreInfo = info; // flatten form 
>>> fields and close
>>> > document   stamper.FormFlattening = true ; 
>>> >  stamper.Close();  
>>> > 
>>> > -- 
>>> > View this message in context:
>>> > 
>>> http://old.nabble.com/Filling-UP-Pdf-forms-Using-ItextSharp---
>>> --Adobe-Read-Out-LOud-not-working-for-Forms-input-field.-tp275
>>> 67978p27567978.html
>>> > Sent from the iText - General mailing list archive at Nabble.com.
>>> > 
>>> > 
>>> > 
>>> --
>>> 
>>> > SOLARIS 10 is the OS for Data Centers - provides features 
>>> such as DTrace,
>>> > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> > http://p.sf.net/sfu/solaris-dev2dev
>>> > ___
>>> > iText-questions mailing list
>>> > iText-questions@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>>> > 
>>> > Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> > Check the site with examples before you ask questions:
>>> > http://www.1t3xt.info/examples/
>>> > You can also search the keywords list:
>>> > http://1t3xt.info/tutorials/keywords/
>>> > 
>>> > 
>>> --
>>> 
>>> > SOLARIS 10 is the OS for Data Centers - provides features 
>>> such as DTrace,
>>> > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> > http://p.sf.net/sfu/solaris-dev2dev
>>> > ___
>>> > iText-questions mailing list
>>> > iText-questions@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>>> > 
>>> > Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> > Check the site with examples before you ask questions:
>>> > http://www.1t3xt.info/examples/
>>> > You can also search the keywords list:
>>> > http://1t3xt.info/tutorials/keywords/
>>> > 
>>> > 
>>> 
>>> -- 
>>> View this message in context: 
>>> http://old.nabble.com/Filling-UP-Pdf-forms-Using-ItextSharp---
>> --Adobe-Read-Out-LOud-not-working-for-Forms-input-field.-tp27567978p27584952.html
>> Sent from the iText - General mailing list archive at Nabble.com.
>> 
>> 
>> --
>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> 

Re: [iText-questions] PDF size after oPdfStamper.FreeTextFlattening, FormFlattening needs to go on a diet ??

2010-02-23 Thread 1T3XT info
tim clark wrote:
> Just for the Archives I have found a solution to this file size issue but I 
> think it is
> application specific but this use case may fit someone else

Er... I didn't understand the initial question,
but the use of PdfSmartCopy is documented in the
MEAP version of "iText in Action 2E".
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] HashMap for FactoryProperties

2010-02-23 Thread privat
Hello,

Since I updated my lib to 2.1.7.
Because createParagraph from HashMap is nolonger supported.
I have trouble with that:

public static Paragraph createParagraph(HashMap props) {
Paragraph p = FactoryProperties.createParagraph(props);

setParagraphFirstLineIndent(p, (String)props.get("indent"));

return p;

}

What should I do to fix that in a easy way?
Maybe a stupid question, but I don't know this part very well.

Thanks for your help

br

Markus






--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Re tain DuplexMode property

2010-02-23 Thread vdunkin

I must doing something wrong, because the following doesn't work 

pdfStamper = new PdfStamper(pdfReader, out, version, true);

pdfReader is the pdf I'm reading in
out is the outputstream I'm sending to a browser
the version is set to 1.7

Any ideas?


Leonard Rosenthol-3 wrote:
> 
> As long as you stamp in "append" mode,, it should be fine.
> 
> -Original Message-
> From: vdunkin [mailto:vdun...@dhs.state.or.us] 
> Sent: Tuesday, February 23, 2010 11:35 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Re tain DuplexMode property
> 
> 
> I am using PdfReader to read in an existing pdf form, then using
> PdfStamper
> to fill the form. The existing pdf has document properties on the advanced
> tab under print dialog presets that specify DuplexMode. I would like to
> retain the settings of the original form so that if the form specifies
> 'Duplex Flip Long Edge' or 'Simplex' my resulting pdf has these
> properties.
> Is there a way to do this? I am specifying pdf v1.7 when creating the
> stamper.
> -- 
> View this message in context:
> http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27706214.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27707327.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Fernando Gomes

I tried this alternative, so I realized the PDF renderer has classes that
handle the image ..
put on it still can not do the same here, get all the images from a PDF -.-

and I would not like to mix several jars.

you have any examples of how to get the images using pdf renderer or pdfbox
or jpedal?




Mike Marchywka-2 wrote:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> Date: Tue, 23 Feb 2010 06:52:54 -0800
>> From: fernandogomes...@hotmail.com
>> To: itext-questions@lists.sourceforge.net
>> Subject: Re: [iText-questions] Using Images extracted from a pdf
>>
>>
>> can anyone help-me one more time..
>> i dont know what i do ..
>>
>> I need to get the image bytes, now decoded...
> 
> probably the open source pdf renderer would answer your questions and
> provide
> more context. I seem to recall it was pretty easy to modify to extract
> page images
> in your favorite format, probably in process of rendering the included
> images
> are extracted etc.
> 
> 
> 
> 
>>
>> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>>> String filter = pdfStrem.get(PdfName.FILTER).toString();
>>> int bits =
>>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>>> int width =
>>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>>> int height =
>>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>>> PdfDictionary param =
>>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>>> int colors =
>>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>>> int predictor =
>>> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
>>> int colums =
>>> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
>>> if(filter.equals("/FlateDecode"))
>>> {
>>> byte[] bytesDecod = PdfReader.FlateDecode(bytes);
>>
>> these are all the information that I can withdraw PDF
>>
>> I have to do to create my image in general ..
>> I'm trying to do, or learn, but this hard, all my attempts have failed.
>> ty
>>
>>
>> Fernando Gomes wrote:
>>>
>>> Sirs, really sorry for duplicating, can delete other topics ?
>>> so sorry ..:blush:
>>>
>>> very thkx for help..
>>> and so good fast help ..
>>> i will estudy more ..
>>>
>>>
>>> Leonard Rosenthol-3 wrote:

 You are assuming that PDF maintains the PNG nature of the image - that
 is
 NOT the case. PDF only supports two kinds of images JPEG (which is why
 this works) and "raw bitmaps" (aka an array of bits). So in your case,
 with the PNG, it is transcoded into the latter case and so if you want
 it
 back you will need to reverse the process on your end.

>>>
>>>
>>> for this response in other same email :blush:
>>> quote of "1T3XT info" below ..
>>>
>>> really thanks. I must have seen the realance the chapter that you
>>> mentioned, I will read again and very carefully. My English is very
>>> weak,
>>> and it is very difficult to read.
>>>
>>> you are very funny, I laughed a lot. I know I deserved the scolding.
>>> Really thanks for your help. I will test and then come back to post the
>>> result.
>>> Thank you!
>>>
>>>
>>> 1T3XT info wrote:

 Fernando Henrique Gomes wrote:
> the problem is when I insert an image in PNG format and then try to
> get
> the same...

 OK, we're talking about a PNG.
 If you've read chapter 10 of the 2nd edition of "iText in Action",
 you know that PNGs are transformed into zipped pixels.
 If you didn't know, you should read the book!

> on here i try to take that image...
>
> [code]
> int XrefIndex =((PRIndirectReference)obj).getNumber();
> PdfObject pdfObj = pdf.getPdfObject(XrefIndex);
> PdfStream pdfStrem = (PdfStream)pdfObj;
> byte[] bytes =
> PdfReader.getStreamBytesRaw((PRStream)pdfStrem);
> if ((bytes != null)) {
> String fileName = "Image_P"+pageNumber+"_";
> File file = new File(fileName);
> FileOutputStream fw = new FileOutputStream(file);
> fw.write(bytes);
> fw.flush();
> fw.close();
> BufferedImage img2 = ImageIO.read(file);
> com.lowagie.text.Image img =
> com.lowagie.text.Image.getInstance(file.toURL());
> }
> [/code]
>
> img2 returned a null 

 Of course, why do you think that would work???

> in line of img .. has a Excpetion
> "Image_P1_ is not a recognized imageformat"

 Of course, you're sending iText a bunch of pixels,
 but: what are the dimensions of the image,
 how many bits are there per component?

> when i try to do :
> [code]
> Image image = Toolkit.getDefaultToolkit().createImage(bytes);
> [code]
>
> and before create an image from this image getting the width and
> height
> from my PdfStream (create a buffered and draw the image)
> when i serialize on a file and visualize this.. this image in a
> fucking
> black picture .. all black -.-

 It's because you don't have a fucking clue about what you're d

Re: [iText-questions] PDF size after oPdfStamper.FreeTextFlattening, FormFlattening needs to go on a diet ??

2010-02-23 Thread tim clark
Just for the Archives I have found a solution to this file size issue but I 
think it is
application specific but this use case may fit someone else
The pages that we are concatenating are identical in layout, font etc
only the content changes  so I instead of using .text.pdf.PdfCopy
we tried iTextSharp.text.pdf.PdfSmartCopy this results in size saving
that are in fact better than Adobe Acrobat Optimized
the test file that was once 341K is now 131K
and x Object Forms is now only 52K compared to the optimizer at 78K

 


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Re tain DuplexMode property

2010-02-23 Thread Leonard Rosenthol
As long as you stamp in "append" mode,, it should be fine.

-Original Message-
From: vdunkin [mailto:vdun...@dhs.state.or.us] 
Sent: Tuesday, February 23, 2010 11:35 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Re tain DuplexMode property


I am using PdfReader to read in an existing pdf form, then using PdfStamper
to fill the form. The existing pdf has document properties on the advanced
tab under print dialog presets that specify DuplexMode. I would like to
retain the settings of the original form so that if the form specifies
'Duplex Flip Long Edge' or 'Simplex' my resulting pdf has these properties.
Is there a way to do this? I am specifying pdf v1.7 when creating the
stamper.
-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27706214.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Re tain DuplexMode property

2010-02-23 Thread vdunkin

I am using PdfReader to read in an existing pdf form, then using PdfStamper
to fill the form. The existing pdf has document properties on the advanced
tab under print dialog presets that specify DuplexMode. I would like to
retain the settings of the original form so that if the form specifies
'Duplex Flip Long Edge' or 'Simplex' my resulting pdf has these properties.
Is there a way to do this? I am specifying pdf v1.7 when creating the
stamper.
-- 
View this message in context: 
http://old.nabble.com/Retain-DuplexMode-property-tp27706214p27706214.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Rotation from center point of any object

2010-02-23 Thread 1T3XT info
rhul_rk wrote:
> Can any one help us???

As I said before, and as you confirmed:
it's a not an iText question, but a question about algebra.
You do the math...
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText program not works to change to a new itext.jar version

2010-02-23 Thread 1T3XT info
NikoBarna wrote:
> I have a programm wich creates a pdf , in the header of the page puts a
> corporative image and some data to the right. This programm works fine when
> i was ussing itext 2.3.jar, but now, i have tried with itext 5.1.jar and not
> works, the imageLogo is not showed... i don't know why...

Your code shouldn't even compile!
Table has been removed, you should switch to PdfPTable.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] iText program not works to change to a new itext.jar version

2010-02-23 Thread NikoBarna

I have a programm wich creates a pdf , in the header of the page puts a
corporative image and some data to the right. This programm works fine when
i was ussing itext 2.3.jar, but now, i have tried with itext 5.1.jar and not
works, the imageLogo is not showed... i don't know why... ¿any ideas?



Cell c = new Cell(imageLogo);
Table headerTable = new Table(2) ;
headerTable.getDefaultCell().setBorder(0); //in old version =
headerTable.setDefaultCellBorder(0);  
headerTable.setBorder(0);
float headerTablewidths[] = { 51f, 49f } ;
headerTable.setWidths(headerTablewidths);
c.setRowspan(8);
headerTable.addCell(c) ; //My image logo
headerTable.addCell(...); //Strings data
headerTable.addCell(...); //Strings data

Thanks for your help
-- 
View this message in context: 
http://old.nabble.com/iText-program-not-works-to-change-to-a-new-itext.jar-version-tp27701829p27701829.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Klas Lindbäck
Images are not rotated around their center. The coordinate of the 
rotation pivot is (0, 0). If you rotate something, you have to watch out 
that it is not rotated 'off' your page. you may have to perform a 
translation to keep the object on the page.


/Klas


rhul_rk skrev 20:59:

Hi,

It's very urgent. We need help in this. Looking towards positive support.




   


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

[iText-questions] Best practice for concatenation

2010-02-23 Thread Stephan, Frank
Hi,

I have a working piece of code that does the following:

1. Read a PDF and fill out the form fields.
2. Create a new document from scratch
3. Read a fix PDF
4. Concatenate the 3 pages and save to file.

I don't want to save anything to file but the resulting PDF.
I'd like to know if there a any big mistakes. What could be done 
in a better way.

Thanx and greetings
Frank


// Loading first PDF with form fields into baosFirstPage
FileInputStream fisFirstPage = new FileInputStream(SRC_FILE_1);
ByteArrayOutputStream baosFirstPage = new ByteArrayOutputStream();
PdfReader readerFirstPage = new PdfReader(fisFirstPage, null);
PdfStamper stamperFirstPage = new PdfStamper(readerFirstPage,
baosFirstPage);
stamperFirstPage.setFormFlattening(true);
AcroFields form = stamperFirstPage.getAcroFields();
// Filling form fields
setFields(form);
stamperFirstPage.close();

// Building 2nd page from scratch into baosProducts
Document document = new Document();
ByteArrayOutputStream baosProducts = new ByteArrayOutputStream();
PdfWriter.getInstance(document, baosProducts);
document.open();
document.add(new Paragraph("Products"));
document.close();

// Loading lastPage into baosLastPage
FileInputStream fisLastPage = new FileInputStream(SRC_FILE_2);
ByteArrayOutputStream baosLastPage = new ByteArrayOutputStream();
PdfReader readerLastPage = new PdfReader(fisLastPage, null);
PdfStamper stamperLastPage = new PdfStamper(readerLastPage,
baosLastPage);
stamperLastPage.close();

// Concatenating the 3 byte array streams into baosResult;
ByteArrayOutputStream baosResult = new ByteArrayOutputStream();
PdfCopyFields copy = new PdfCopyFields(baosResult);
copy.addDocument(new PdfReader(baosFirstPage.toByteArray()));
copy.addDocument(new PdfReader(baosProducts.toByteArray()));
copy.addDocument(new PdfReader(baosLastPage.toByteArray()));
copy.close();

// Write result to file
PdfReader readerResult = new PdfReader(baosResult.toByteArray());
PdfStamper stamperResult = new PdfStamper(readerResult, new
FileOutputStream(DST_FILE));
stamperResult.close();

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Using Images extracted from a pdf

2010-02-23 Thread Mike Marchywka











> Date: Tue, 23 Feb 2010 06:52:54 -0800
> From: fernandogomes...@hotmail.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Using Images extracted from a pdf
>
>
> can anyone help-me one more time..
> i dont know what i do ..
>
> I need to get the image bytes, now decoded...

probably the open source pdf renderer would answer your questions and provide
more context. I seem to recall it was pretty easy to modify to extract page 
images
in your favorite format, probably in process of rendering the included images
are extracted etc.




>
> String colorSpace = pdfStrem.get(PdfName.COLORSPACE).toString();
>> String filter = pdfStrem.get(PdfName.FILTER).toString();
>> int bits =
>> Integer.valueOf(pdfStrem.get(PdfName.BITSPERCOMPONENT).toString());
>> int width =
>> Integer.valueOf(pdfStrem.get(PdfName.WIDTH).toString());
>> int height =
>> Integer.valueOf(pdfStrem.get(PdfName.HEIGHT).toString());
>> PdfDictionary param =
>> (PdfDictionary)pdfStrem.get(PdfName.DECODEPARMS);
>> int colors =
>> Integer.valueOf(param.get(PdfName.COLORS).toString());
>> int predictor =
>> Integer.valueOf(param.get(PdfName.PREDICTOR).toString());
>> int colums =
>> Integer.valueOf(param.get(PdfName.COLUMNS).toString());
>> if(filter.equals("/FlateDecode"))
>> {
>> byte[] bytesDecod = PdfReader.FlateDecode(bytes);
>
> these are all the information that I can withdraw PDF
>
> I have to do to create my image in general ..
> I'm trying to do, or learn, but this hard, all my attempts have failed.
> ty
>
>
> Fernando Gomes wrote:
>>
>> Sirs, really sorry for duplicating, can delete other topics ?
>> so sorry ..:blush:
>>
>> very thkx for help..
>> and so good fast help ..
>> i will estudy more ..
>>
>>
>> Leonard Rosenthol-3 wrote:
>>>
>>> You are assuming that PDF maintains the PNG nature of the image - that is
>>> NOT the case. PDF only supports two kinds of images JPEG (which is why
>>> this works) and "raw bitmaps" (aka an array of bits). So in your case,
>>> with the PNG, it is transcoded into the latter case and so if you want it
>>> back you will need to reverse the process on your end.
>>>
>>
>>
>> for this response in other same email :blush:
>> quote of "1T3XT info" below ..
>>
>> really thanks. I must have seen the realance the chapter that you
>> mentioned, I will read again and very carefully. My English is very weak,
>> and it is very difficult to read.
>>
>> you are very funny, I laughed a lot. I know I deserved the scolding.
>> Really thanks for your help. I will test and then come back to post the
>> result.
>> Thank you!
>>
>>
>> 1T3XT info wrote:
>>>
>>> Fernando Henrique Gomes wrote:
 the problem is when I insert an image in PNG format and then try to get
 the same...
>>>
>>> OK, we're talking about a PNG.
>>> If you've read chapter 10 of the 2nd edition of "iText in Action",
>>> you know that PNGs are transformed into zipped pixels.
>>> If you didn't know, you should read the book!
>>>
 on here i try to take that image...

 [code]
 int XrefIndex =((PRIndirectReference)obj).getNumber();
 PdfObject pdfObj = pdf.getPdfObject(XrefIndex);
 PdfStream pdfStrem = (PdfStream)pdfObj;
 byte[] bytes =
 PdfReader.getStreamBytesRaw((PRStream)pdfStrem);
 if ((bytes != null)) {
 String fileName = "Image_P"+pageNumber+"_";
 File file = new File(fileName);
 FileOutputStream fw = new FileOutputStream(file);
 fw.write(bytes);
 fw.flush();
 fw.close();
 BufferedImage img2 = ImageIO.read(file);
 com.lowagie.text.Image img =
 com.lowagie.text.Image.getInstance(file.toURL());
 }
 [/code]

 img2 returned a null 
>>>
>>> Of course, why do you think that would work???
>>>
 in line of img .. has a Excpetion
 "Image_P1_ is not a recognized imageformat"
>>>
>>> Of course, you're sending iText a bunch of pixels,
>>> but: what are the dimensions of the image,
>>> how many bits are there per component?
>>>
 when i try to do :
 [code]
 Image image = Toolkit.getDefaultToolkit().createImage(bytes);
 [code]

 and before create an image from this image getting the width and height
 from my PdfStream (create a buffered and draw the image)
 when i serialize on a file and visualize this.. this image in a fucking
 black picture .. all black -.-
>>>
>>> It's because you don't have a fucking clue about what you're doing :P
>>> Hehe, I was waiting for an occasion to use the F* word on the list.
>>> Thanks!
>>>
 if i use JPEG encode for my images.. all the 3 solution i have .. its
 ok.. have effects..
>>>
>>> Well, that's because iText stores JPEGs literally as a JPEG without
>>> changing any of the bytes. If you look inside, you'll see that the
>>> filter is DCTDecode (Discrete Cosine Transform).
>>>
 i can vizualize my images how to i create then .. perfect..
 but if i change de JPEG ... for any other encode.. thats not have

Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Khadikar, Rahul
Thanks Mike :)

Regards,
Rahul Khadikar 

-Original Message-
From: Mike Marchywka [mailto:marchy...@hotmail.com] 
Sent: Tuesday, February 23, 2010 5:07 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] After rotation, images are getting displced
in iText PDF


it looks like it was in your response, hotmail has been 
a big problem with "Executing" text that happens
to look like html even with text mode on, but in this
case it seems it made it out since it made it back, 





> From: ra...@vinfotech.com
> Mike, thanks for trying to post the answer. But I get empty reply from
> yours. Might be accidentally it happen. I will be glad to receive the
> answer.
>
> Thanks!!!
> Rahul Khadikar
> -Original Message-
> From: Mike Marchywka [mailto:marchy...@hotmail.com]
> Sent: Tuesday, February 23, 2010 4:42 PM
>> It's very urgent. We need help in this. Looking towards positive support.
>
> If this is that urgent,
> can't you just "kluge" a solution by translating the output or is this
more
> involved than a one-line call? I thought the conclusion was something
> to that effect being the best itext solution.
> Designing an API is always a tradeoff, and it is possible there is no
> "center" parameter
> anywhere
>
>

 Am I right if I say that this is more like a Math question (algebra)
 than an iText question?
 --
 This answer is provided by 1T3XT BVBA
>
>

  
_
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Mike Marchywka

it looks like it was in your response, hotmail has been 
a big problem with "Executing" text that happens
to look like html even with text mode on, but in this
case it seems it made it out since it made it back, 





> From: ra...@vinfotech.com
> Mike, thanks for trying to post the answer. But I get empty reply from
> yours. Might be accidentally it happen. I will be glad to receive the
> answer.
>
> Thanks!!!
> Rahul Khadikar
> -Original Message-
> From: Mike Marchywka [mailto:marchy...@hotmail.com]
> Sent: Tuesday, February 23, 2010 4:42 PM
>> It's very urgent. We need help in this. Looking towards positive support.
>
> If this is that urgent,
> can't you just "kluge" a solution by translating the output or is this more
> involved than a one-line call? I thought the conclusion was something
> to that effect being the best itext solution.
> Designing an API is always a tradeoff, and it is possible there is no
> "center" parameter
> anywhere
>
>

 Am I right if I say that this is more like a Math question (algebra)
 than an iText question?
 --
 This answer is provided by 1T3XT BVBA
>
>

  
_
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Rotation from center point of any object

2010-02-23 Thread Paulo Soares
Image.RotationDegree=45 will rotate the image from the center point but it will 
place it by the bottom left corner of the rectangle containing the image after 
the rotation. If you have problems calculating the position after that you 
should go back to kindergarden and learn how to do sums. Did you by any chance 
read the book or looked at the examples or did any effort to solve the problem 
rather than asking the same question 10 times? (and don't tell me the examples 
are in Java)

Paulo

> -Original Message-
> From: rhul_rk [mailto:ra...@vinfotech.com] 
> Sent: Tuesday, February 23, 2010 11:10 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Rotation from center point of any object
> 
> 
> Hi Everyone!!!
> 
> Just want to know, is there any mechanism in iTextSharp to 
> rotate the object
> from center point of object, instead of Bottom left Corner. 
> iTextSharp has a
> rotation mechanism which is "Image.RotationDegree=45". But it is not
> allowing us to rotate the object from center point. It 
> allowing us to rotate
> the image from Bottom Left Corner. Our requirement is to 
> rotate the object
> from center point of object.
> 
> Can any one help us???
> 
> Looking towards your great support...
> 
> Regards,
> Rahul


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Khadikar, Rahul
Mike, thanks for trying to post the answer. But I get empty reply from
yours. Might be accidentally it happen. I will be glad to receive the
answer. 

Thanks!!! 
Rahul Khadikar 



-Original Message-
From: Mike Marchywka [mailto:marchy...@hotmail.com] 
Sent: Tuesday, February 23, 2010 4:42 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] After rotation, images are getting displced
in iText PDF










> Date: Mon, 22 Feb 2010 20:33:10 -0800
> From: ra...@vinfotech.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] After rotation, images are getting displced
in iText PDF
>
>
> Hi,
>
> It's very urgent. We need help in this. Looking towards positive support.

If this is that urgent,
can't you just "kluge" a solution by translating the output or is this more
involved than a one-line call? I thought the conclusion was something
to that effect being the best itext solution.
Designing an API is always a tradeoff, and it is possible there is no
"center" parameter
anywhere


>>>
>>> Am I right if I say that this is more like a Math question (algebra)
>>> than an iText question?
>>> --
>>> This answer is provided by 1T3XT BVBA



>
>
>
> rhul_rk wrote:
>>
>> Yes, you are right, there are lots of calculation and algebra in this.
But
>> each and every object plots in the PDF are exist in an imaginary (hidden)
>> rectangle. When we plot an image (without rotation) it is plotting at the
>> correct location. but when we rotate an object, it gets displaced in PDF.
>> Because as stated earlier each object is exist in the imaginary (hidden)
>> rectangle, which is having "Plane and Absolute height & Width". On
>> rotation, absolute height and width gets changed but Plane height width
>> remains the same. These are the height and width of imaginary (hidden)
>> rectangle.
>>
>> Say, we are rotating the object in iTextSharp with the help of
>> "Image.RotationDegree=45". It rotates the object to 45 degree from the
>> "Bottom Left Corner" of the imaginary (hidden) rectangle instead of
actual
>> image's Bottom Left Corner. Just want to ask you that is there any
>> mechanism in iTextSharp to rotate any object from center point instead of
>> bottom left corner?
>>
>> Thanks for you quick reply. Looking for you support.
>>
>> Thanks,
>> Rahul
>>
>>
>>
>>
>> 1T3XT info wrote:
>>>
>>> rhul_rk wrote:
 One more thing here
 we would like to mention that, in flex application items are rotating
 from
 center point and in the iTextSharp PDF items are rotating from Lower
 Bottom
 corner. Is their any sort of mechanism in iTeshSharp to rotate the
image
 from center point with mention Degree of rotation.

 Hope we are clear with our issue.
>>>
>>> Am I right if I say that this is more like a Math question (algebra)
>>> than an iText question?
>>> --
>>> This answer is provided by 1T3XT BVBA
>>> http://www.1t3xt.com/ - http://www.1t3xt.info
>>>
>>>

--
>>> Download IntelR Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> ___
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>>> http://www.1t3xt.info/examples/
>>> You can also search the keywords list:
>>> http://1t3xt.info/tutorials/keywords/
>>>
>>>
>>
>>
>
> --
> View this message in context:
http://old.nabble.com/After-rotation%2C-images-are-getting-displced-in-iText
-PDF-tp27683306p27698368.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
>

--
> Download IntelR Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
> You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/20146

Re: [iText-questions] After rotation, images are getting displced in iText PDF

2010-02-23 Thread Mike Marchywka









> Date: Mon, 22 Feb 2010 20:33:10 -0800
> From: ra...@vinfotech.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] After rotation, images are getting displced in 
> iText PDF
>
>
> Hi,
>
> It's very urgent. We need help in this. Looking towards positive support.

If this is that urgent,
can't you just "kluge" a solution by translating the output or is this more
involved than a one-line call? I thought the conclusion was something
to that effect being the best itext solution.
Designing an API is always a tradeoff, and it is possible there is no "center" 
parameter
anywhere


>>>
>>> Am I right if I say that this is more like a Math question (algebra)
>>> than an iText question?
>>> --
>>> This answer is provided by 1T3XT BVBA



>
>
>
> rhul_rk wrote:
>>
>> Yes, you are right, there are lots of calculation and algebra in this. But
>> each and every object plots in the PDF are exist in an imaginary (hidden)
>> rectangle. When we plot an image (without rotation) it is plotting at the
>> correct location. but when we rotate an object, it gets displaced in PDF.
>> Because as stated earlier each object is exist in the imaginary (hidden)
>> rectangle, which is having "Plane and Absolute height & Width". On
>> rotation, absolute height and width gets changed but Plane height width
>> remains the same. These are the height and width of imaginary (hidden)
>> rectangle.
>>
>> Say, we are rotating the object in iTextSharp with the help of
>> "Image.RotationDegree=45". It rotates the object to 45 degree from the
>> "Bottom Left Corner" of the imaginary (hidden) rectangle instead of actual
>> image's Bottom Left Corner. Just want to ask you that is there any
>> mechanism in iTextSharp to rotate any object from center point instead of
>> bottom left corner?
>>
>> Thanks for you quick reply. Looking for you support.
>>
>> Thanks,
>> Rahul
>>
>>
>>
>>
>> 1T3XT info wrote:
>>>
>>> rhul_rk wrote:
 One more thing here
 we would like to mention that, in flex application items are rotating
 from
 center point and in the iTextSharp PDF items are rotating from Lower
 Bottom
 corner. Is their any sort of mechanism in iTeshSharp to rotate the image
 from center point with mention Degree of rotation.

 Hope we are clear with our issue.
>>>
>>> Am I right if I say that this is more like a Math question (algebra)
>>> than an iText question?
>>> --
>>> This answer is provided by 1T3XT BVBA
>>> http://www.1t3xt.com/ - http://www.1t3xt.info
>>>
>>> --
>>> Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> ___
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>>> http://www.1t3xt.info/examples/
>>> You can also search the keywords list:
>>> http://1t3xt.info/tutorials/keywords/
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/After-rotation%2C-images-are-getting-displced-in-iText-PDF-tp27683306p27698368.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469227/direct/01/
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions maili

[iText-questions] Rotation from center point of any object

2010-02-23 Thread rhul_rk

Hi Everyone!!!

Just want to know, is there any mechanism in iTextSharp to rotate the object
from center point of object, instead of Bottom left Corner. iTextSharp has a
rotation mechanism which is "Image.RotationDegree=45". But it is not
allowing us to rotate the object from center point. It allowing us to rotate
the image from Bottom Left Corner. Our requirement is to rotate the object
from center point of object.

Can any one help us???

Looking towards your great support...

Regards,
Rahul
-- 
View this message in context: 
http://old.nabble.com/Rotation-from-center-point-of-any-object-tp27701691p27701691.html
Sent from the iText - General mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Retrieve Fonts from an existing PDF?

2010-02-23 Thread Mike Marchywka







> Date: Tue, 23 Feb 2010 09:26:10 +0100
> From: i...@1t3xt.info
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Retrieve Fonts from an existing PDF?
>
> Nirmal Fernando wrote:
>> How can I retrieve Fonts of an existing PDF? Is there a way in iText to
>> read the fonts embedded and replace them with a different type of font??
>
> This isn't necessarily impossible, but in most cases it's very difficult
> and in some cases it's very unwise.
>
> For instance: what if only a subset of the font is present in the PDF?
> Then you'll never be able to retrieve the full font, and will you
> replace this subset with a full font or a corresponding subset?
>
> Do you know anything about encoding? Do you know anything about CMaps?
> Do you know anything about the differences in metrics?
>
> For instance: the width of the words "Foobar Film Festival" is 178.74 pt
> in Helvetica, but only 157.90 in Times-Roman for the same font size
> (12). In other words: if you replace Helvetica with Times-Roman, you'll
> screw up your entire layout. Remember that PDF is NOT a Word processing
> format; every glyph is positioned at a predictable location. If you want
> to change the font, you need to do the layout all over again. That is:
> recreate the PDF from scratch.

I guess I'd just ask how hard it would have been for original author to
include enough information, either with standard or an agreed upon
private convention, to the OP to do any required re-layout? That is, 
what would be involved in creating the original pdf with enough logical
structure to make it likely you could accomodate a font change ( or
just extract the words that are often the only thing people care about,
not fonts and columns etc)?

This is just a variant of my recurring rant ( we want information not
pictures in many cases to feed other computer programs ) to which you 
contribute a good
point- fonts are complicated and human readability ads a lot of stuff. 
A human audience of course is perfectly valid and there is nothing wrong with
using graphics to make it easier for the reader. However, having a short 
tractable alphabet, rather than
say words composed of unordered and unbounded collection of things,
or even 24-bit color pictures,  is
a big asset in organizing information- once you start adding stuff it can
be confusing unless you take some care to separate the information from artwork.



> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
  
_
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread 1T3XT info
M. Niedermair wrote:
> So i must call a external process and use pdfcrop more.

That may be your only option for the time being.
We're hoping to finalize the parser functionality in 3 to 6 months.
Until then, the API is likely to undergo some changes.
It's all very new.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Fwd: [itextsharp-questions] Positioning with text format (bold, italic, strikeout, underline)

2010-02-23 Thread 1T3XT info
Johannes Wörz wrote:
> Hello
> 
> I have a problem, I want to absolute positioning text with the format bold,
> italic, strikeout and underline, how can i do this?
> Answers please with code.

Use ColumnText.
This object allows you to add high-level objects at absolute positions.
There are lots of examples in the MEAP version of "iText in Action 2nd 
edition".
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread M. Niedermair
1T3XT info schrieb:
> M. Niedermair wrote:
>> It is possible to get all elements (with position and bounding box) of 
>> the page? So i can calculate it self.
> 
> That's for you to find out. I don't know.
> You'll have to take a look at the parser package.

I'm afraid that is to complex for me.

So i must call a external process and use pdfcrop more.

By
Michael

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Fwd: [itextsharp-questions] Positioning with text format (bold, italic, strikeout, underline)

2010-02-23 Thread Johannes Wörz
 Original-Nachricht 
Datum: Tue, 23 Feb 2010 09:33:04 +
Von: itextsharp-questions-ow...@lists.sourceforge.net
An: johanneswo...@gmx.net
Betreff: [itextsharp-questions] Positioning with text format (bold, italic, 
strikeout, underline)

The iTextSharp mailing list is closed. Use the iText mailing list.


-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
--- Begin Message ---

Hello

I have a problem, I want to absolute positioning text with the format bold,
italic, strikeout and underline, how can i do this?
Answers please with code.

sorry for my bad english.
-- 
View this message in context: 
http://old.nabble.com/Positioning-with-text-format-%28bold%2C-italic%2C-strikeout%2C-underline%29-tp27700060p27700060.html
Sent from the itextsharp-questions mailing list archive at Nabble.com.


--- End Message ---
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Constructing PDF/A document

2010-02-23 Thread Paulo Soares
If you use PdfCopy and set the color profile at the end it will work.

Paulo

- Original Message - 
From: "Stephan, Frank" 
To: "Post all your questions about iText here" 

Sent: Tuesday, February 23, 2010 8:35 AM
Subject: [iText-questions] Constructing PDF/A document


Hi,

I know how to generate PDF/A with iText. What if I want to use one page
of PDF/A doc X and one page of PFD/A doc Y and append them. Will the new
PDF/A still be PDF/A? What about the embedded fonts,...?

Greetings
Frank



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread 1T3XT info
M. Niedermair wrote:
> It is possible to get all elements (with position and bounding box) of 
> the page? So i can calculate it self.

That's for you to find out. I don't know.
You'll have to take a look at the parser package.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread M. Niedermair
Hi,

>> It works, but how can i calculate the white room about the context?
> 
> Do you mean you want to know which part of the margin is blank? 

Yes!

> That's 
> very difficult. I didn't have the time to try the new PDF parsing 
> functionality yet. I don't know if it's possible yet with iText.

It is possible to get all elements (with position and bounding box) of 
the page? So i can calculate it self.

By
Michael



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread 1T3XT info
M. Niedermair wrote:
> It works, but how can i calculate the white room about the context?

Do you mean you want to know which part of the margin is blank? That's 
very difficult. I didn't have the time to try the new PDF parsing 
functionality yet. I don't know if it's possible yet with iText.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread M. Niedermair
Hi,

> public void manipulatePdf(String src, String dest)
>  throws IOException, DocumentException {
>PdfReader reader = new PdfReader(src);
>int n = reader.getNumberOfPages();
>PdfDictionary pageDict;
>PdfRectangle rect = new PdfRectangle(55, 76, 560, 816);
>for (int i = 1; i <= n; i++) {
>  pageDict = reader.getPageN(i);
>  pageDict.put(PdfName.CROPBOX, rect);
>}
>PdfStamper stamper
>  = new PdfStamper(reader, new FileOutputStream(dest));
>stamper.close();
> }

It works, but how can i calculate the white room about the context?

By
Michael



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Constructing PDF/A document

2010-02-23 Thread Stephan, Frank
Hi,

I know how to generate PDF/A with iText. What if I want to use one page
of PDF/A doc X and one page of PFD/A doc Y and append them. Will the new
PDF/A still be PDF/A? What about the embedded fonts,...?

Greetings
Frank

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread 1T3XT info
M. Niedermair wrote:
> Hi,
> 
> it is possible to crop a pdf with itext

Oops, I had some code in my ClipBoard, but instead of pasting it,
I hit the send button. Here's what I intended to paste:

public void manipulatePdf(String src, String dest)
 throws IOException, DocumentException {
   PdfReader reader = new PdfReader(src);
   int n = reader.getNumberOfPages();
   PdfDictionary pageDict;
   PdfRectangle rect = new PdfRectangle(55, 76, 560, 816);
   for (int i = 1; i <= n; i++) {
 pageDict = reader.getPageN(i);
 pageDict.put(PdfName.CROPBOX, rect);
   }
   PdfStamper stamper
 = new PdfStamper(reader, new FileOutputStream(dest));
   stamper.close();
}

-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] iText and pdfcrop

2010-02-23 Thread 1T3XT info
M. Niedermair wrote:
> Hi,
> 
> it is possible to crop a pdf with itext

Yes, loop over the page dictionaries (PdfReader.getPageN())
and add a crop box to these dictionaries.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Retrieve Fonts from an existing PDF?

2010-02-23 Thread 1T3XT info
Nirmal Fernando wrote:
> How can I retrieve Fonts of an existing PDF? Is there a way in iText to 
> read the fonts embedded and replace them with a different type of font??

This isn't necessarily impossible, but in most cases it's very difficult 
and in some cases it's very unwise.

For instance: what if only a subset of the font is present in the PDF? 
Then you'll never be able to retrieve the full font, and will you 
replace this subset with a full font or a corresponding subset?

Do you know anything about encoding? Do you know anything about CMaps? 
Do you know anything about the differences in metrics?

For instance: the width of the words "Foobar Film Festival" is 178.74 pt 
in Helvetica, but only 157.90 in Times-Roman for the same font size 
(12). In other words: if you replace Helvetica with Times-Roman, you'll 
screw up your entire layout. Remember that PDF is NOT a Word processing 
format; every glyph is positioned at a predictable location. If you want 
to change the font, you need to do the layout all over again. That is: 
recreate the PDF from scratch.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] iText and pdfcrop

2010-02-23 Thread M. Niedermair
Hi,

it is possible to crop a pdf file with itext like the perlscript pdfcrop?

By
Michael



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Retrieve Fonts from an existing PDF?

2010-02-23 Thread Nirmal Fernando
How can I retrieve Fonts of an existing PDF? Is there a way in iText to read 
the fonts embedded and replace them with a different type of font??

Thanks in advance !!

--

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and for use only by
the intended recipient. If you are not the intended recipient, please notify
us immediately and delete this e-mail from your system. Any use or disclosure
of the information contained herein is strictly prohibited. As internet
communications are not secure, we do not accept legal responsibility for the
contents of this message nor responsibility for any change made to this
message after it was sent by the original sender. We advise you to carry out
your own virus check as we cannot accept liability for damage resulting from
software viruses.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/