[iText-questions] Merry Christmas all

2006-12-22 Thread David Thielen
 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Problem with PdfPCell and addElement

2006-12-22 Thread Bruno Lowagie
GAMBELLI Raffaele wrote:
> I believe that a PdfPCell cannot accept directly a Paragraph as Element...in 
> fact if you see its constructors you will notice that there isn't a 
> constructor which takes a Parapgraph as arguments...

That's not the problem.
Paragraph extends Phrase; the Paragraph will be considered as a Phrase 
if you construct a PdfPCell with it.

I have tested the code and it works. I think the original poster is 
wrong when he thinks the document is empty. He's using an example he has 
found somewhere, but he doesn't understand what it's about.

Have a look at this line:
table.writeSelectedRows(0, -1, document.leftMargin(), 
document.topMargin(), writer.getDirectContent());

Because it says document.topMargin() the original poster probably thinks 
the table should appear at the top of the page, as a 'header' (his 
words). That assumption is wrong; document.topMargin() is something like 
36 pt (half an inch). If you use this value in writeSelectedRows, you'll 
draw the table at 36 from the bottom (in other words: it's more like a 
footer than a header).

best regards,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Text File conversion in-memory through Servlets

2006-12-22 Thread Bruno Lowagie
Paulo Soares wrote:
> Our sale reps are ready to take your call.

But we don't accept collect calls ;-)
*LOL*

No honestly, anyone that does a minimum of research on iText knows that 
iText is Free / Open Source Software and that we don't sell anything and 
don't have a Sales/Customer Rep.
As for the txt to PDF conversion, add three lines to the Hello World 
example and you have your application.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Text File conversion in-memory through Servlets

2006-12-22 Thread Paulo Soares
iText can do all that you need to do. Our sale reps are ready to take your 
call.

Paulo

- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 22, 2006 4:56 PM
Subject: [iText-questions] Text File conversion in-memory through Servlets


> Dear Sales/Customer Rep,
>
>
> We have '.txt' files which are imported into AIX/Solaris directories on
> daily basis. Earlier, we were using 'C' source library (obtained from
> www.fastio.com) embedded into our CGI application code and it was
> generating, using these .txt files as input and outputting PDF reports
> on-the-fly (in memory) to users 'when' they needed through the web menus
> options. We want to use your software with our Java code based application
> just for the same purpose as it was used with 'C'/CGI code.
>
> We have standard reports of upto 255 char length and we want to output
> them into PDF using different fonts etc through Java Servlets residing in
> IBM's WAS 6.0
>
> I have gone through your Site and 'Tutorials of iTEXT by Example' but I
> did not find any example of  any ".txt" file taken as an INPUT file and
> converted into OUTPUT of  a PDF FILE. Is this feature or conversion
> available through your APIs if used in JAVA Servlets of our application?
> Has any commercial user of your package or any developer partner has used
> your APIs for the purposes like ours?
>
> Thank you in advance for response.
>
> Rahath
>





> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV





> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Text File conversion in-memory through Servlets

2006-12-22 Thread Bill Ensley
iText is definetely capable of outputing such files to a browser, you
however need to "read" the .txt file and decide how it should be rendered.
 
-Bill Ensley
Bear Printing


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, December 22, 2006 8:56 AM
To: itext-questions@lists.sourceforge.net
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [iText-questions] Text File conversion in-memory through Servlets



Dear Sales/Customer Rep, 


We have '.txt' files which are imported into AIX/Solaris directories on
daily basis. Earlier, we were using 'C' source library (obtained from
www.fastio.com) embedded into our CGI application code and it was
generating, using these .txt files as input and outputting PDF reports
on-the-fly (in memory) to users 'when' they needed through the web menus
options. We want to use your software with our Java code based application
just for the same purpose as it was used with 'C'/CGI code. 

We have standard reports of upto 255 char length and we want to output them
into PDF using different fonts etc through Java Servlets residing in IBM's
WAS 6.0 

I have gone through your Site and 'Tutorials of iTEXT by Example' but I did
not find any example of  any ".txt" file taken as an INPUT file and
converted into OUTPUT of  a PDF FILE. Is this feature or conversion
available through your APIs if used in JAVA Servlets of our application? Has
any commercial user of your package or any developer partner has used your
APIs for the purposes like ours? 

Thank you in advance for response. 

Rahath 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Text File conversion in-memory through Servlets

2006-12-22 Thread rm22
Dear Sales/Customer Rep,


We have '.txt' files which are imported into AIX/Solaris directories on 
daily basis. Earlier, we were using 'C' source library (obtained from 
www.fastio.com) embedded into our CGI application code and it was 
generating, using these .txt files as input and outputting PDF reports 
on-the-fly (in memory) to users 'when' they needed through the web menus 
options. We want to use your software with our Java code based application 
just for the same purpose as it was used with 'C'/CGI code.

We have standard reports of upto 255 char length and we want to output 
them into PDF using different fonts etc through Java Servlets residing in 
IBM's WAS 6.0

I have gone through your Site and 'Tutorials of iTEXT by Example' but I 
did not find any example of  any ".txt" file taken as an INPUT file and 
converted into OUTPUT of  a PDF FILE. Is this feature or conversion 
available through your APIs if used in JAVA Servlets of our application? 
Has any commercial user of your package or any developer partner has used 
your APIs for the purposes like ours?

Thank you in advance for response.

Rahath 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Problem with PdfPCell and addElement

2006-12-22 Thread GAMBELLI Raffaele
I believe that a PdfPCell cannot accept directly a Paragraph as Element...in 
fact if you see its constructors you will notice that there isn't a constructor 
which takes a Parapgraph as arguments...

Try using a Chunck:
PdfPCell pdfPCell = new PdfPCell(new Phrase(chunk));

A paragraph can be composed by more chunks... you could do:
List chunks = paragraph.getChunks();
for (Iterator iterator = chunks.iterator(); iterator.hasNext();) {
 Chunk chunk = (Chunk)iterator.next();
 // Creo una cella con la chunk appena recuperata
 PdfPCell pdfPCell = new PdfPCell(new Phrase(chunk));
...
}

Bye

Raffaele

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Eric
Summkeller
Sent: venerdì 22 dicembre 2006 15.11
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Problem with PdfPCell and addElement


I would like to create a header. For this I create a PdfPTable with one 
PdfPCell and add some Pararaphs into the PdfPCell with the addElement method. 
My Problem is that the Document is empty. 
Any ideas?

Code:

Rectangle page = document.getPageSize();
PdfPTable table = new PdfPTable(1);
PdfPCell cell = new PdfPCell();
Paragraph paragraph = new Paragraph("Hello World");
cell.addElement(paragraph);
table.addCell(cell);
table.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin
());
table.writeSelectedRows(0, -1, document.leftMargin(), document.topMargin(), 
writer.getDirectContent());



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Problem with PdfPCell and addElement

2006-12-22 Thread Eric Summkeller
I would like to create a header. For this I create a PdfPTable with one 
PdfPCell and add some Pararaphs into the PdfPCell with the addElement method. 
My Problem is that the Document is empty. 
Any ideas?

Code:

Rectangle page = document.getPageSize();
PdfPTable table = new PdfPTable(1);
PdfPCell cell = new PdfPCell();
Paragraph paragraph = new Paragraph("Hello World");
cell.addElement(paragraph);
table.addCell(cell);
table.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin
());
table.writeSelectedRows(0, -1, document.leftMargin(), document.topMargin(), 
writer.getDirectContent());



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Bruno Lowagie (iText)
Sawant, Ramdas (IT) wrote:
> Sorry Bruno, but can you list down the steps again.

FIRST

1. create a PdfReader reader1 with the original document
and select all pages lower than or equal to the
page that needs duplication (use selectPages).
2. create a PdfReader reader2 with the original document
and select all pages equal to or higher than the page
that needs duplication.
3. rename the fields in the reader created in 2.

THEN

Possibility 1
4. stitch the result together with copyFields
5. use PdfStamper to fill the fields

Possibility 2
4. create a PdfStamper with reader 1 and fill the fields
5. create a PdfStamper with reader 2 and fill the fields
6. create a new document with the result of both stampers

br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Sawant, Ramdas (IT)
Sorry Bruno, but can you list down the steps again. I am totally
confused :( Didn't get you (u talking about possibility first or
second). Please bear with me... Waiting for your reply. Thanks

Regards,
Ramdas Sawant

Associate Consultant, Kanbay
Manikchand Ikon, South Wing 18 Dhole Patil Road
Pune  411001
INDIA


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bruno Lowagie (iText)
Sent: Friday, December 22, 2006 4:36 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Replicate a page containing form fields
in PDF using itext lib

Sawant, Ramdas (IT) wrote:
> Thanks Bruno for the instant reply. Regarding possibility second. How
to
> use PdfCopyFields to stitch pages from both readers. I want to insert
> the page in between the original pdf (not append it at last).

OK, I was in a hurry.
Replace step 4 like this:

4a. create a NEW PdfReader with the original document
 and select all pages lower than or equal to the
 page that needs duplication.
4b. create a NEW PdfReader with the original document
 and select all pages higher than the page that
 needs duplication.

As a matter of fact, you could use the reader created
in step 4b to rename the fields. That way you don't

even need step 1 to 3.
br,
Bruno


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Bruno Lowagie (iText)
Sawant, Ramdas (IT) wrote:
> Thanks Bruno for the instant reply. Regarding possibility second. How to
> use PdfCopyFields to stitch pages from both readers. I want to insert
> the page in between the original pdf (not append it at last).

OK, I was in a hurry.
Replace step 4 like this:

4a. create a NEW PdfReader with the original document
 and select all pages lower than or equal to the
 page that needs duplication.
4b. create a NEW PdfReader with the original document
 and select all pages higher than the page that
 needs duplication.

As a matter of fact, you could use the reader created
in step 4b to rename the fields. That way you don't

even need step 1 to 3.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Sawant, Ramdas (IT)
Thanks Bruno for the instant reply. Regarding possibility second. How to
use PdfCopyFields to stitch pages from both readers. I want to insert
the page in between the original pdf (not append it at last).
addDocument() method of PdfCopyFields helps to keep only selected pages
from the pdf(correct me if I am wrong plz ). I don't see any other
method of PdfCopyFields helpful. Waiting for your explaination. Thanks.

Regards,
Ramdas Sawant

Associate Consultant, Kanbay
Manikchand Ikon, South Wing 18 Dhole Patil Road
Pune  411001
INDIA


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bruno Lowagie (iText)
Sent: Friday, December 22, 2006 3:25 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Replicate a page containing form fields
in PDF using itext lib

Ramdas Sawant wrote:

 > Can any one suggest how can do this.

There are two ways to do it.

POSSIBILITY 1
1. create a PdfReader object
2. create a PdfStamper object
3. insert a page
4 a. read the page you want to replicate
4 b. read the fields you want to replicate
5. recreate fields with the same info,
but change the field name.
6 a. add the PdfImportedPage (has no fields!)
6 b. add the field you have created in 5.
7. close the stamper

POSSIBILITY 2
1. create a PdfReader object
2. select the page you need (remove all others)
3. rename the fields
4. create a NEW PdfReader object for the original form
5. use PdfCopyFields to stitch pages from both reader
objects together
6. the end result will be a new form. You already
know how to fill such a form.

 > If it is a sample code will help a lot

Sorry, no time for that.

 >  Following is the code I tried. It added the new page, but it didn't 
added the controls L

Please avoid stuff like this:
 > reader1.setPageContent(2,baos.toByteArray());
That's very dangerous code (see chapter 18 of the book).
Use PdfImportedPage instead.
The problem is that fields are not stored in the page
content. You need to add them separately. See step 5
under possibility 1.

br,
Bruno


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Bruno Lowagie (iText)
Ramdas Sawant wrote:

 > Can any one suggest how can do this.

There are two ways to do it.

POSSIBILITY 1
1. create a PdfReader object
2. create a PdfStamper object
3. insert a page
4 a. read the page you want to replicate
4 b. read the fields you want to replicate
5. recreate fields with the same info,
but change the field name.
6 a. add the PdfImportedPage (has no fields!)
6 b. add the field you have created in 5.
7. close the stamper

POSSIBILITY 2
1. create a PdfReader object
2. select the page you need (remove all others)
3. rename the fields
4. create a NEW PdfReader object for the original form
5. use PdfCopyFields to stitch pages from both reader
objects together
6. the end result will be a new form. You already
know how to fill such a form.

 > If it is a sample code will help a lot

Sorry, no time for that.

 >  Following is the code I tried. It added the new page, but it didn't 
added the controls L

Please avoid stuff like this:
 > reader1.setPageContent(2,baos.toByteArray());
That's very dangerous code (see chapter 18 of the book).
Use PdfImportedPage instead.
The problem is that fields are not stored in the page
content. You need to add them separately. See step 5
under possibility 1.

br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Ramdas Sawant

Hi all,

   I have a pdf containing text fields. While filling the data in
the pdf, I want to replicate a particular page on certain condition.

Can any one suggest how can do this.

Following is the requirement

1.identify the page to replicate. E.g page no 10.
2.create the duplicate of the page., change the names of the fields present
on that particular page e.g append some number to the 3.name of the field,
so that there will be no conflict in the names(duplicate names) of the
field.
4.set the  values of the newly created fields(duplicated page fields)
5.insert the above page after page no 10 in the original pdf.

Please let me know if this is possible or not. If it is a sample code will
help a lot J
Following is the code I tried. It added the new page, but it didn't added
the controls L

PdfReader reader = null;

   ByteArrayOutputStream baos = null;

   PdfStamper stamp = null;

   AcroFields fields = null;



   PdfReader reader1 = null;

   ByteArrayOutputStream baos1 = new
ByteArrayOutputStream();

   PdfStamper stamp1 = null;

   AcroFields fields1 = null;



   List l = new ArrayList();

   l.add(new Integer(1));

   // following function returns extracted pages from
the pdf. It extracts suppose 1st page which I want to replicate.

   baos = mergePages(new
FileInputStream("c:\\Ramdas\\iText\\T.pdf"),l);



   try {

   reader = new PdfReader(new
ByteArrayInputStream(baos.toByteArray()));

   baos.reset();

   stamp = new PdfStamper(reader, baos);

   fields = stamp.getAcroFields();

   String a[] = (String
[])fields.getFields().keySet().toArray(new String[1]);

   for(int i=0;i-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] IText cyrillic table of contents (TOC) in RTF format problem

2006-12-22 Thread Nenko Ivanov
Hi all,

I have problem when I generate Table of Contents for RTF Document, and 
when the text is with Cyrillic characters.
The text I get looks like this

B1CfC8D1DaCa CdC0 
D3D7C0D1D2CdC8D6C8D2C5...
 
1 <#_Toc152578037>

Can anyone give me advice how I can solve this problem or any other clue 
where I can start from

Thanks in advance

Nenko Ivanov



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Replicate a page containing form fields in PDF using itext lib

2006-12-22 Thread Sawant, Ramdas (IT)
Please note that while replying/answering to this mail make sure
[EMAIL PROTECTED] is in the address bar. :-)

 

Hi all,



I have a pdf containing text fields. While filling the data
in the pdf, I want to replicate a particular page on certain condition. 

Can any one suggest how can do this. 

 

Following is the requirement

 

1.  identify the page to replicate. E.g page no 10.
2.  create the duplicate of the page., change the names of the
fields present on that particular page e.g append some number to the
name of the field, so that there will be no conflict in the
names(duplicate names) of the field.
3.  set the  values of the newly created fields(duplicated page
fields)
4.  insert the above page after page no 10 in the original pdf.

 

Please let me know if this is possible or not. If it is a sample code
will help a lot :-)

 

Following is the code I tried. It added the new page, but it didn't
added the controls :-(

 

PdfReader reader = null;

ByteArrayOutputStream baos = null;

PdfStamper stamp = null;

AcroFields fields = null;

 

PdfReader reader1 = null;

ByteArrayOutputStream baos1 = new
ByteArrayOutputStream();

PdfStamper stamp1 = null;

AcroFields fields1 = null;

 

List l = new ArrayList();

l.add(new Integer(1));

// following function returns extracted pages
from the pdf. It extracts suppose 1st page which I want to replicate.

baos = mergePages(new
FileInputStream("c:\\Ramdas\\iText\\T.pdf"),l);



try {

reader = new PdfReader(new
ByteArrayInputStream(baos.toByteArray()));

baos.reset();

stamp = new PdfStamper(reader,
baos);

fields = stamp.getAcroFields();

String a[] = (String
[])fields.getFields().keySet().toArray(new String[1]);

for(int i=0;i-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] PdfPTable tableToPdfPTable(Table table)

2006-12-22 Thread Bruno Lowagie (iText)
GAMBELLI Raffaele wrote:
> Thank you,
> 
> but is there an official list of the elements not supported by PdfPTable?

It's explained in the book (chapter 6).

> I imagine the isConvert2pdfptable() tells if a Table can be converted or not 
> before doing the real conversion?

No, it just returns the value of the parameter
I told you about in the previous mail.
Before I change anything, I'll have to think
about the best way to do this table2pdfptable
conversion. I remember writing it after a
specific demand from somebody at work.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] PdfPTable tableToPdfPTable(Table table)

2006-12-22 Thread Bruno Lowagie (iText)
GAMBELLI Raffaele wrote:
> I'm continuing to receive the 
> com.lowagie.text.BadElementException: No error, just an old style table

OK, I finally found the time to test this.
I have written this functionality a long time ago.
As it turns out, you need to set the convert2pdfptable
parameter first:

Table table = new Table(3);
table.addCell("ciao");
table.addCell("quindi?");
table.addCell("ah yeah");
table.setConvert2pdfptable(true);
PdfPTable test = table.createPdfPTable();
doc.add(test);

I may refactor this in a future version.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Is there any way to protect PDF print for second time?

2006-12-22 Thread Bruno Lowagie (iText)
nahid mahbub wrote:
> Hello,
> For business requirement I need to protect PDF print for second time.
> Is it possible?

Not with Adobe Acrobat, not with iText.

> I need to print money receipt which should not print second time.
> I need to lock my PDF file also so that none can change the money amount 
> (Content of PDF).
> 
> Can any one help me please?

You'll have to look for a DRM solution.
You'll soon find out that every possible solution
will turn out to be very expensive.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/