[iText-questions] How to merge the pages with different size into one pdf file

2010-08-14 Thread gavin

Hi
   Firstly ,I open the pdf template file with different size ,then write
some signatures in and output as a new pdf file.But new file can not
maintain the original size.I am not sure why this is happening 

com.lowagie.text.pdf.PdfReader reader = new
com.lowagie.text.pdf.PdfReader(path);
com.lowagie.text.Document document = new
com.lowagie.text.Document();

afileName = "app_" + tmpFileName;
PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream(pathstr + File.separator
+ afileName));

document.open();
  
n = reader.getNumberOfPages();
for (int i = 1; i < n + 1; i++) {
Rectangle psize = reader.getPageSize(i);
String capptype = (String) pageMap.get(Integer.toString(i));

float height = psize.height();
float width = psize.width();

if (VERBOSE)
System.out.println("doc height: " + height);
if (VERBOSE)
System.out.println("doc width: " + width);
rectPageSize = new Rectangle(width, height);
  PdfContentByte cb = writer.getDirectContent();
String size = getSpecPropertiesValue("ext.config.filetype", 
"SIZE");
PdfImportedPage pagei = writer.getImportedPage(reader, i);
if (size.equals("A4")) {
cb.addTemplate(pagei, 0, 0);
} else
cb.addTemplate(pagei, 0, -1f, 1f, 0, 0,
reader.getPageSizeWithRotation(i).height());
cb.beginText();


 cb.endText();
document.newPage();
}
document.close();


-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-to-merge-the-pages-with-different-size-into-one-pdf-file-tp2325079p2325079.html
Sent from the iText - General mailing list archive at Nabble.com.
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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] Bug in DocumentFont when loading Differences

2008-03-24 Thread Gavin Disney
Bruno,

Thanks again. Don't rush the release on my account!

Regards,
Gavin

- Original Message 
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Friday, March 21, 2008 2:11:21 AM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

Gavin Disney wrote:
> Great!  Thanks very much.

I've added you to the acknowledgments list:
http://www.1t3xt.com/about/acknowledgments/index.php?page=people&id=178

I was preparing the new release, but unfortunately my son had to return
to the hospital; see http://lowagie.com/maand.php?year=2008&month=3#776
http://www.nabble.com/-personal-message--some-bad-news-p15636777.html
I'll try finishing the release next week.

best regards,
Bruno

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
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/



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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] Bug in DocumentFont when loading Differences

2008-03-20 Thread Gavin Disney
Great!  Thanks very much.

Gavin

- Original Message 
From: Paulo Soares <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Thursday, March 20, 2008 1:48:24 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

It's already in the SVN.

Paulo

- Original Message ----- 
From: "Gavin Disney" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 

Sent: Thursday, March 20, 2008 5:41 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences


Hi Paulo,

Just wondering if you've got any thoughts on this?

Thanks in advance,
Gavin Disney

- Original Message 
From: Paulo Soares <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Thursday, March 13, 2008 2:57:18 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

Send me your changes and we'll go from there.

Paulo

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Gavin Disney
> Sent: Thursday, March 13, 2008 6:42 PM
> To: iText Questions
> Subject: Re: [iText-questions] Bug in DocumentFont when
> loading Differences
>
> Okay, and thanks for the quick response.
>
> The problem occurs when a substitution is being made that
> replaces a high unicode value with a low unicode value.
> Consider the font dictionary:
>
> key: /R10value: Dictionary of type: /Font
> key: /BaseFontvalue: /Times-Roman
> key: /Typevalue: /Font
> key: /Subtypevalue: /Type1
> key: /Encodingvalue: Dictionary of type: /Encoding
> key: /Typevalue: /Encoding
> key: /Differencesvalue: [39, /quotesingle]
>
> In the standard encoding, this replaces quoteright (unicode
> value 8217) at position 39 with quotesingle (unicode value
> 39). As the font is loaded by doType1TT() the encoding is
> determined and then "filled" by populating the IntHashtable
> uni2byte with the unicode values and their position. So,
> after initial population, uni2byte holds a key of 8217
> (quoteright) for position 39. Then the differences are
> processed and the mapping of unicode 39 (quotesingle) to
> position 39 is added to the map. Now uni2byte holds 2
> mappings pointing to position 39.
>
> The BaseFont is then created to instantiate metrics, and the
> widths array populated. And this is where we run into the
> problem. The keys are extracted from the map ordered
> ascending and used to populate the widths array using this loop:
>
> 
> int e[] = uni2byte.toOrderedKeys();
> for (int k = 0; k < e.length; ++k) {
> int n = uni2byte.get(e[k]);
> widths[n] = bf.getRawWidth(n,
> GlyphList.unicodeToName(e[k]));
> }
> 
>
> Since uni2byte holds two mappings for n=39 and the keys are
> iterated in asc. order, widths[39] will be populated with the
> width for quotesingle (unicode 39) first, then overwritten
> with the width for quoteright (unicode 8217). Now the width
> for position 39 is incorrect (333 in this case, as opposed to
> 180 for quotsingle).
>
> A simple (maybe naive) fix is to populate a second map
> (byte2uni) when filling the encoding, and then query this map
> when processing the differences, removing mappings from
> uni2byte where byte2uni maps a character at that position
> before adding the substition. e.g.:
>
> 
> for (int k = 0; k < dif.size(); ++k) {
> PdfObject obj = (PdfObject)dif.get(k);
> if (obj.isNumber())
> currentNumber =
> ((PdfNumber)obj).intValue();
> else {
> int c[] =
> GlyphList.nameToUnicode(PdfName.decodeName(((PdfName)obj).toSt
> ring()));
> if (c != null && c.length > 0) {
> if
> (byte2uni.containsKey(currentNumber)) {
>
> uni2byte.remove(byte2uni.get(currentNumber)); // Remove prior
> mapping for position being substituted
> }
> uni2byte.put(c[0], currentNumber);
> byte2uni.put(currentNumber, c[0]);
> }
> ++currentNumber;
> }
> }
> 
>
> Another solution is to alter the IntHashtable mechanics to
> allow easy removal of a value - enabling something like
> "uni2byte.removeValue(currentNumber);" or maybe "if
> (uni2byte.contains(currentNumber))
> uni2byte.remove(uni2byte.getKey(currentNumber));".
>
> I ha

Re: [iText-questions] Bug in DocumentFont when loading Differences

2008-03-20 Thread Gavin Disney
Hi Paulo,

Just wondering if you've got any thoughts on this?

Thanks in advance,
Gavin Disney

- Original Message 
From: Paulo Soares <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Thursday, March 13, 2008 2:57:18 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

Send me your changes and we'll go from there.

Paulo 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Gavin Disney
> Sent: Thursday, March 13, 2008 6:42 PM
> To: iText Questions
> Subject: Re: [iText-questions] Bug in DocumentFont when 
> loading Differences
> 
> Okay, and thanks for the quick response.
> 
> The problem occurs when a substitution is being made that 
> replaces a high unicode value with a low unicode value. 
> Consider the font dictionary:
> 
> key: /R10value: Dictionary of type: /Font
> key: /BaseFontvalue: /Times-Roman
> key: /Typevalue: /Font
> key: /Subtypevalue: /Type1
> key: /Encodingvalue: Dictionary of type: /Encoding
> key: /Typevalue: /Encoding
> key: /Differencesvalue: [39, /quotesingle]
> 
> In the standard encoding, this replaces quoteright (unicode 
> value 8217) at position 39 with quotesingle (unicode value 
> 39). As the font is loaded by doType1TT() the encoding is 
> determined and then "filled" by populating the IntHashtable 
> uni2byte with the unicode values and their position. So, 
> after initial population, uni2byte holds a key of 8217 
> (quoteright) for position 39. Then the differences are 
> processed and the mapping of unicode 39 (quotesingle) to 
> position 39 is added to the map. Now uni2byte holds 2 
> mappings pointing to position 39.
> 
> The BaseFont is then created to instantiate metrics, and the 
> widths array populated. And this is where we run into the 
> problem. The keys are extracted from the map ordered 
> ascending and used to populate the widths array using this loop:
> 
> 
> int e[] = uni2byte.toOrderedKeys();
> for (int k = 0; k < e.length; ++k) {
> int n = uni2byte.get(e[k]);
> widths[n] = bf.getRawWidth(n, 
> GlyphList.unicodeToName(e[k]));
> }
> 
> 
> Since uni2byte holds two mappings for n=39 and the keys are 
> iterated in asc. order, widths[39] will be populated with the 
> width for quotesingle (unicode 39) first, then overwritten 
> with the width for quoteright (unicode 8217). Now the width 
> for position 39 is incorrect (333 in this case, as opposed to 
> 180 for quotsingle).
> 
> A simple (maybe naive) fix is to populate a second map 
> (byte2uni) when filling the encoding, and then query this map 
> when processing the differences, removing mappings from 
> uni2byte where byte2uni maps a character at that position 
> before adding the substition. e.g.:
> 
> 
> for (int k = 0; k < dif.size(); ++k) {
> PdfObject obj = (PdfObject)dif.get(k);
> if (obj.isNumber())
> currentNumber = 
> ((PdfNumber)obj).intValue();
> else {
> int c[] = 
> GlyphList.nameToUnicode(PdfName.decodeName(((PdfName)obj).toSt
> ring()));
> if (c != null && c.length > 0) {
> if 
> (byte2uni.containsKey(currentNumber)) {
>  
> uni2byte.remove(byte2uni.get(currentNumber)); // Remove prior 
> mapping for position being substituted
> }
> uni2byte.put(c[0], currentNumber);
> byte2uni.put(currentNumber, c[0]);
> }
> ++currentNumber;
> }
> }
> 
> 
> Another solution is to alter the IntHashtable mechanics to 
> allow easy removal of a value - enabling something like 
> "uni2byte.removeValue(currentNumber);" or maybe "if 
> (uni2byte.contains(currentNumber)) 
> uni2byte.remove(uni2byte.getKey(currentNumber));". 
> 
> I have a modified copy of DocumentFont.java that implements 
> the naive fix, and am happy to send it to you. I'm still 
> playing around with changes to the IntHashtable class as a 
> solution. It's not clear to me which approach would impact 
> performance least.
> 
> Cheers,
> Gavin Disney
> 
> 
> - Original Message 
> From: Paulo Soares <[EMAIL PROTECTED]>
> To: Post all your questions about iText here 
> 
> Sent:

Re: [iText-questions] Bug in DocumentFont when loading Differences

2008-03-13 Thread Gavin Disney
Attached is a zip file with a modified version of DocumentFont.java 
implementing the naive solution and a diff of the changes.  As I mentioned, a 
more elegant approach might be to change the IntHashtable implementation.

Cheers, and thanks for taking time to look into this.
Gavin 

- Original Message 
From: Paulo Soares <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Thursday, March 13, 2008 2:57:18 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

Send me your changes and we'll go from there.

Paulo 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Gavin Disney
> Sent: Thursday, March 13, 2008 6:42 PM
> To: iText Questions
> Subject: Re: [iText-questions] Bug in DocumentFont when 
> loading Differences
> 
> Okay, and thanks for the quick response.
> 
> The problem occurs when a substitution is being made that 
> replaces a high unicode value with a low unicode value. 
> Consider the font dictionary:
> 
> key: /R10value: Dictionary of type: /Font
> key: /BaseFontvalue: /Times-Roman
> key: /Typevalue: /Font
> key: /Subtypevalue: /Type1
> key: /Encodingvalue: Dictionary of type: /Encoding
> key: /Typevalue: /Encoding
> key: /Differencesvalue: [39, /quotesingle]
> 
> In the standard encoding, this replaces quoteright (unicode 
> value 8217) at position 39 with quotesingle (unicode value 
> 39). As the font is loaded by doType1TT() the encoding is 
> determined and then "filled" by populating the IntHashtable 
> uni2byte with the unicode values and their position. So, 
> after initial population, uni2byte holds a key of 8217 
> (quoteright) for position 39. Then the differences are 
> processed and the mapping of unicode 39 (quotesingle) to 
> position 39 is added to the map. Now uni2byte holds 2 
> mappings pointing to position 39.
> 
> The BaseFont is then created to instantiate metrics, and the 
> widths array populated. And this is where we run into the 
> problem. The keys are extracted from the map ordered 
> ascending and used to populate the widths array using this loop:
> 
> 
> int e[] = uni2byte.toOrderedKeys();
> for (int k = 0; k < e.length; ++k) {
> int n = uni2byte.get(e[k]);
> widths[n] = bf.getRawWidth(n, 
> GlyphList.unicodeToName(e[k]));
> }
> 
> 
> Since uni2byte holds two mappings for n=39 and the keys are 
> iterated in asc. order, widths[39] will be populated with the 
> width for quotesingle (unicode 39) first, then overwritten 
> with the width for quoteright (unicode 8217). Now the width 
> for position 39 is incorrect (333 in this case, as opposed to 
> 180 for quotsingle).
> 
> A simple (maybe naive) fix is to populate a second map 
> (byte2uni) when filling the encoding, and then query this map 
> when processing the differences, removing mappings from 
> uni2byte where byte2uni maps a character at that position 
> before adding the substition. e.g.:
> 
> 
> for (int k = 0; k < dif.size(); ++k) {
> PdfObject obj = (PdfObject)dif.get(k);
> if (obj.isNumber())
> currentNumber = 
> ((PdfNumber)obj).intValue();
> else {
> int c[] = 
> GlyphList.nameToUnicode(PdfName.decodeName(((PdfName)obj).toSt
> ring()));
> if (c != null && c.length > 0) {
> if 
> (byte2uni.containsKey(currentNumber)) {
>  
> uni2byte.remove(byte2uni.get(currentNumber)); // Remove prior 
> mapping for position being substituted
> }
> uni2byte.put(c[0], currentNumber);
> byte2uni.put(currentNumber, c[0]);
> }
> ++currentNumber;
> }
> }
> 
> 
> Another solution is to alter the IntHashtable mechanics to 
> allow easy removal of a value - enabling something like 
> "uni2byte.removeValue(currentNumber);" or maybe "if 
> (uni2byte.contains(currentNumber)) 
> uni2byte.remove(uni2byte.getKey(currentNumber));". 
> 
> I have a modified copy of DocumentFont.java that implements 
> the naive fix, and am happy to send it to you. I'm still 
> playing around with changes to the IntHashtable class as a 
> solution. It's not clear to me which approach would impact 
> performance least.
> 
> Cheers,
>

Re: [iText-questions] Bug in DocumentFont when loading Differences

2008-03-13 Thread Gavin Disney
Okay, and thanks for the quick response.

The problem occurs when a substitution is being made that replaces a high 
unicode value with a low unicode value. Consider the font dictionary:

key: /R10value: Dictionary of type: /Font
key: /BaseFontvalue: /Times-Roman
key: /Typevalue: /Font
key: /Subtypevalue: /Type1
key: /Encodingvalue: Dictionary of type: /Encoding
key: /Typevalue: /Encoding
key: /Differencesvalue: [39, /quotesingle]

In the standard encoding, this replaces quoteright (unicode value 8217) at 
position 39 with quotesingle (unicode value 39). As the font is loaded by 
doType1TT() the encoding is determined and then "filled" by populating the 
IntHashtable uni2byte with the unicode values and their position. So, after 
initial population, uni2byte holds a key of 8217 (quoteright) for position 39. 
Then the differences are processed and the mapping of unicode 39 (quotesingle) 
to position 39 is added to the map. Now uni2byte holds 2 mappings pointing to 
position 39.

The BaseFont is then created to instantiate metrics, and the widths array 
populated. And this is where we run into the problem. The keys are extracted 
from the map ordered ascending and used to populate the widths array using this 
loop:


int e[] = uni2byte.toOrderedKeys();
for (int k = 0; k < e.length; ++k) {
int n = uni2byte.get(e[k]);
widths[n] = bf.getRawWidth(n, GlyphList.unicodeToName(e[k]));
}


Since uni2byte holds two mappings for n=39 and the keys are iterated in asc. 
order, widths[39] will be populated with the width for quotesingle (unicode 39) 
first, then overwritten with the width for quoteright (unicode 8217). Now the 
width for position 39 is incorrect (333 in this case, as opposed to 180 for 
quotsingle).

A simple (maybe naive) fix is to populate a second map (byte2uni) when filling 
the encoding, and then query this map when processing the differences, removing 
mappings from uni2byte where byte2uni maps a character at that position before 
adding the substition. e.g.:


for (int k = 0; k < dif.size(); ++k) {
PdfObject obj = (PdfObject)dif.get(k);
if (obj.isNumber())
currentNumber = ((PdfNumber)obj).intValue();
else {
int c[] = 
GlyphList.nameToUnicode(PdfName.decodeName(((PdfName)obj).toString()));
if (c != null && c.length > 0) {
if (byte2uni.containsKey(currentNumber)) {
 
uni2byte.remove(byte2uni.get(currentNumber)); // Remove prior mapping for 
position being substituted
}
uni2byte.put(c[0], currentNumber);
byte2uni.put(currentNumber, c[0]);
}
++currentNumber;
}
}


Another solution is to alter the IntHashtable mechanics to allow easy removal 
of a value - enabling something like "uni2byte.removeValue(currentNumber);" or 
maybe "if (uni2byte.contains(currentNumber)) 
uni2byte.remove(uni2byte.getKey(currentNumber));". 

I have a modified copy of DocumentFont.java that implements the naive fix, and 
am happy to send it to you. I'm still playing around with changes to the 
IntHashtable class as a solution. It's not clear to me which approach would 
impact performance least.

Cheers,
Gavin Disney

- Original Message 
From: Paulo Soares <[EMAIL PROTECTED]>
To: Post all your questions about iText here 

Sent: Thursday, March 13, 2008 1:52:25 PM
Subject: Re: [iText-questions] Bug in DocumentFont when loading Differences

 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Gavin Disney
> Sent: Thursday, March 13, 2008 5:39 PM
> To: iText-questions@lists.sourceforge.net
> Subject: [iText-questions] Bug in DocumentFont when loading 
> Differences
> 
> Hi iText Developers
> 
> There seems to be a minor bug in the processing of 
> Differences from the Encoding dictionary when creating a 
> DocumentFont for Type 1 fonts. The bug is quite subtle, and 
> depends on the substitutions being made and the encoding 
> being used.  It is straightforward to correct - I'd like to 
> discuss a couple of possible fixes.
> 
> Is this the appropriate forum?
> 

Yes.

Paulo




-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
iText-questions mailing list
iText-questi

[iText-questions] Bug in DocumentFont when loading Differences

2008-03-13 Thread Gavin Disney
Hi iText Developers

There seems to be a minor bug in the processing of Differences from the 
Encoding dictionary when creating a DocumentFont for Type 1 fonts. The bug is 
quite subtle, and depends on the substitutions being made and the encoding 
being used.  It is straightforward to correct - I'd like to discuss a couple of 
possible fixes.

Is this the appropriate forum?

Cheers,
Gavin Disney


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
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] Tables and new pages

2006-01-17 Thread Gavin
Hi all,

I need some help sorting out a formatting issue when creating an pdf.

Basically i'm creating a table, setting all the settings, then from a database 
going through each result and creating the cells to display the data.

What I am doing is looping through the results, and each time adding 4 new 
cells to the table, which works perfectly fine, but if the results continue 
onto a new page, the first 2 rows or sets of cells overlap each other.

Below is the code that generates the pdf document, the results are collected 
into an Arraylist of file objects.

[code]
try
{
PdfWriter writer = PdfWriter.GetInstance
(basedoc, new FileStream(Server.MapPath("") + "/_files/" + IPAddress.Replace
(".","") + ".pdf", FileMode.Create));
writer.SetEncryption
(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);

basedoc.Open();

Font items_font = new Font(1, 10f);
basedoc.Header = new HeaderFooter(new 
Phrase("File Review Report - ", items_font), new Phrase( " : " + 
DateTime.Now.ToShortDateString(), items_font));

Table main = new Table(4, 2);
main.DefaultCellBorder = 0;
main.Border = 0;
main.Cellpadding = 0;
main.Cellspacing = 0;
main.Padding = 0;

main.SetWidths(new int[4]{ 50, 300, 
100, 75});

Font Header_Font = new Font(1, 20f);
Font List_Font = new Font(1, 10f);

Table Header = new Table(2);

Header.DefaultCellBorder = 0;
Header.Border = 0;
Header.Cellpadding = 0;
Header.Cellspacing = 0;
Header.Padding = 0;

Paragraph Paragraph_HDR_MainText = new 
Paragraph("File Review Report - " + AccountName, Header_Font);
Paragraph Paragraph_HDR_SmallText = new 
Paragraph("Created: " + DateTime.Now.ToShortDateString(), List_Font);
Cell Header_MainText = new Cell();
Header_MainText.Add
(Paragraph_HDR_MainText);
Header_MainText.Add
(Paragraph_HDR_SmallText);

iTextSharp.text.Image logo = 
iTextSharp.text.Image.GetInstance(Server.MapPath("logo.gif"));
logo.ScaleToFit(45f, 45f);
logo.Alignment = 
iTextSharp.text.Image.ALIGN_RIGHT;
Cell Header_Logo = new Cell();
Header_Logo.Add(logo);

Header.AddCell(Header_MainText);
Header.AddCell(Header_Logo);

Paragraph spacer_content = new Paragraph
("s ", new Font(1, 20f, 1, iTextSharp.text.Color.WHITE));
Cell spacer = new Cell(spacer_content);
spacer.Colspan = 4;

main.AddCell(spacer);

basedoc.Add(Header);

Phrase header_1_phrase = new Phrase
("Barcode", List_Font);
Cell header_1 = new Cell
(header_1_phrase);

Phrase header_2_phrase = new Phrase
("Reference", List_Font);
Cell header_2 = new Cell
(header_2_phrase);

Phrase header_3_phrase = new Phrase
("Holder", List_Font);
Cell header_3 = new Cell
(header_3_phrase);

Phrase header_4_phrase = new Phrase
("Review Date", List_Font);
Cell header_4 = new Cell
(header_4_phrase);

main.AddCell(header_1);
main.AddCell(header_2);
main.AddCell(header_3);
main.AddCell(header_4);

Paragraph spacer_content1 = new 
Paragraph("s ", 

[iText-questions] Running Chapter 1 example

2002-03-03 Thread Gavin . Stilgoe





 When I run the chapter one example i get the following

java -cp $CLASSPATH:./iText.jar:./iTextXML.jar Chap0101

Chapter 1 example 1: Hello World

Exception in thread "main" java.lang.NoSuchMethodError
at com.lowagie.text.pdf.PdfDate.(Unknown Source)
at com.lowagie.text.pdf.PdfDate.(Unknown Source)
at com.lowagie.text.pdf.PdfDocument$PdfInfo.addCreationDate(Unknown Sour
ce)
at com.lowagie.text.pdf.PdfDocument$PdfInfo.(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.getInstance(Unknown Source)
at Chap0101.main(Chap0101.java:22)

Can anyone enlighten me as to why ?

 thanks
Gavin



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