[iText-questions] Complex structures arranged in columns: possible?

2002-03-19 Thread Alan_Leung


I am trying to assemble a LETTER-size page that I would like to transform into a
Landscape-oriented page which is divided into two halves.  Rotating a LETTER
page is not a problem and I can also restrict the document to just the left-hand
side of my Landscape-oriented page but I would like to also use the right-hand
half.

I am also using headers and footers (using the HeaderFooter class).  So, ideally
when  the PDFWriter gets to the end of the left-hand side of the page, it would
continue on the right-hand half of the page, effectively making two columns of
content.  I have tried using the ColumnText class but more complex content such
as Tables (or Tables inside Phrases) cannot be rendered with the ColumnText.  It
appears only text can be put into a ColumnText.

Any suggestions?

Alan



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



[iText-questions] SAXmyHtmlHandler

2002-03-19 Thread Painter, Matthew

Hi,

As part of a PDF report that's being generated by software that I am working
on, a small amount of HTML data is parsed and inserted into the document.
Ideally, this text should be placed in a cell in order to preserve alignment
with the rest of the report. 

However, SAXmyHtmlHandler() accepts a DocListener as a parameter - is there
any way to get the output of this inserted within a cell?

Thanks,
Matt

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



[iText-questions] Using the PdfReader(byte[]) constructor

2002-03-19 Thread Paul Cooley

I have used IText now for over a year now and have
never quite come across this particular problem.  

I have a component which must take a
java.io.InputStream and then convert the InputStream
into a byte[] so the document can be read and then
appended to an existing pdf document.

The PdfReader continues to throw:
java.io.IOException: PDF header signature not found.
at
com.lowagie.text.pdf.PRTokeniser.checkPdfHeader(PRTokeniser.java:159)
at
com.lowagie.text.pdf.PdfReader.readPdf(PdfReader.java:184)
at
com.lowagie.text.pdf.PdfReader.(PdfReader.java:115)
at
com.bp.nagp.confirm.pdf_generator.ByteArrayTest.main(ByteArrayTest.java:80)

I get this particular error when reading the pdf from
a DataInputStream and constructing the propery byte[].
 The number of btyes in the array match those in the
file.  However, the encodings appear to be different. 
Any ideas?  

Thanks.

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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



RE: [iText-questions] Display Bug: scaled-down copy of page is overlaying the original page

2002-03-19 Thread Joachim F. Petzold

Just found the solution...
it's apparently caused by a bug in Acrobat 5.0x (prior to .05).
Upgrading to 5.05 solved the issue.

Joachim Petzold

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Joachim
> F. Petzold
> Sent: Tuesday, March 19, 2002 1:30 PM
> To: iText Mailing List
> Subject: [iText-questions] Display Bug: scaled-down copy of page is
> overlaying the original page
> Importance: High
> 
> 
> I am using iText to create PDF reports on the fly.
> The pdf files are written to disk, and then the browser instance is
> redirected to the URL of the temporary pdf file.
> 
> When the pdf file appears in the browser window, the display is all
> scrambled:
> The first page is overlaid with one or two scaled-down (and sometimes
> mirrored) images of the page.
> 
> The pdf file displays when opening it directly, indicating that the file
> itself is not corrupt. However, I didn't experience this issue 
> until adding
> a PdfTemplate for page headers and page numbering to the report.
> Also, the behavior is the same on Netscape and IE (using Acrobat 5.0)
> 
> Any ideas or input are appreciated.
> 
> Thanks,
> Joachim Petzold
> 
> 
> 
> Joachim F. Petzold
> [EMAIL PROTECTED]
> 
> 
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


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



RE: [iText-questions] Display Bug: scaled-down copy of page is overlaying the original page

2002-03-19 Thread Chen, Donald

I also applied a template on the header.  

The redicted URL did not work for me.  I sort of go around the problem by
using the following ( on UNIX ):

   set the header to be "application/pdf", and then "cat pdfFileName";


So far, it works on IE and Netscape.

Hope this help,

Don

-Original Message-
From: Joachim F. Petzold [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 1:30 PM
To: iText Mailing List
Subject: [iText-questions] Display Bug: scaled-down copy of page is
overlaying the original page


I am using iText to create PDF reports on the fly.
The pdf files are written to disk, and then the browser instance is
redirected to the URL of the temporary pdf file.

When the pdf file appears in the browser window, the display is all
scrambled:
The first page is overlaid with one or two scaled-down (and sometimes
mirrored) images of the page.

The pdf file displays when opening it directly, indicating that the file
itself is not corrupt. However, I didn't experience this issue until adding
a PdfTemplate for page headers and page numbering to the report.
Also, the behavior is the same on Netscape and IE (using Acrobat 5.0)

Any ideas or input are appreciated.

Thanks,
Joachim Petzold



Joachim F. Petzold
[EMAIL PROTECTED]



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

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



[iText-questions] Re: IText V0.88

2002-03-19 Thread bruno

[EMAIL PROTECTED] writes:

> Hello Dear, 
> 
> 
> IText is great but the zip files of version 0.88 are corrupted.

I received 5 versions of your mail ;-) 

If you refer at the tar.gz files at SourceForge,
you are right. They should be removed by now
Allthough I have my doubts: I got a warning
'You must be administrator of this site to remove
these files' a few times. Also SourceForge seems
to be very slow for the moment. I have set these
files 'Not available' at my own site. 

I hope you are able to download release 0.88
from lowagie.com (FTP or HTTP) without any problem.
http://www.lowagie.com/iText/docs.html 

kind regards,
Bruno

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



RE: [iText-questions] Re: HeaderFooter and extra page problem

2002-03-19 Thread Wilson AJ

I keep seeing questions similar to this pop up on the list.  Does anyone
know why an extra page is generated if you place headers in the
onStartPage?  It seems to me that the onStartPage should not be called
unless content has already been added that would cause another page
to be needed.

It seems to me that it is caused by the two newPage() calls at the start
of the PdfDocument close() method.  Does anyone know why these are there?
They should cause an onEndPage (rightfully so for the current page)
followed by an onStartPage, which indicates to the listeners that another
page is needed even though it isn't.  Couldn't newPage() be broken into 
two private methods (such as endCurrentPage and startNewPage) and only
endCurrentPage be called within the close() method?

This would seem to do away with the restriction of writing content within
the onStartPage.  This restriction was one of the two reasons that I had
to copy the addPTable method and place all content myself instead of using
the built-in layout mechanisms.

Since I have dynamic vertical header lengths I could not just start placing
content and go back and place the headers later (because the header might
not have fit, or it might have had too much vertical spacing after it).

The other reason I copied the addPTable method (if anyone cares) is that I
I needed to indent tables on both the right and left (different from the
margin settings) and there was no clean and convenient way to do this that
I could find.

Again, my real questing is why the close() methods needs to cause an
onStartPage event?

A.J. Wilson


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, March 19, 2002 2:54 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [iText-questions] Re: HeaderFooter and extra page problem
> 
> 
> [EMAIL PROTECTED] writes:
> 
> > If I use the onStartPage/onEndPage method of adding 
> headers/footers, 
> > the document has some text squished together on the second and 
> > subsequent pages, and still has the extra page!
> 
> You may use onStartPage only to set variables. Not to add 
> content. Add content (such as a header or footer) in the onEndPage.
> 
> ___
> iText-questions mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 

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



RE: [iText-questions] Re: indentation of columnText

2002-03-19 Thread Paulo Soares

I can't see the reason for this. A negative first line indent will achieve
the same.

Best Regards,
Paulo Soares

> -Original Message-
> From: Thomas McKay [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 19, 2002 14:23
> To:   [EMAIL PROTECTED]
> Cc:   iText
> Subject:  RE: [iText-questions] Re: indentation of columnText
> 
> Here's the code I added to ColumnText.java to set a "following indent."
> 
> 
> CAFFEINE:...lowagie/text/pdf> cvs diff ColumnText.java
> Index: ColumnText.java
> ===
> RCS file: /cvsroot/itext/src/com/lowagie/text/pdf/ColumnText.java,v
> retrieving revision 1.17
> diff -r1.17 ColumnText.java
> 134a135,137
> >
> > /** The following paragraph lines indent. */
> > protected float followingIndent = 0;
> 443a447,464
> >  * Sets the following paragraph lines indent.
> >  * @param indent the indent
> >  */
> > public void setFollowingIndent(float indent)
> > {
> > this.followingIndent = indent;
> > }
> >
> > /**
> >  * Gets the following paragraph lines indent.
> >  * @return the indent
> >  */
> > public float getFollowingIndent()
> > {
> > return followingIndent;
> > }
> >
> > /**
> 558c579
> < firstIndent = line.isNewlineSplit() ? indent : 0;
> ---
> > firstIndent = line.isNewlineSplit() ? indent :
> followingIndent
> ;
> 595c616
> < firstIndent = line.isNewlineSplit() ? indent : 0;
> ---
> > firstIndent = line.isNewlineSplit() ? indent :
> followingIndent
> ;
> 631c652
> < }
> \ No newline at end of file
> ---
> > }
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, March 19, 2002 9:08 AM
> To: Thomas McKay
> Cc: iText
> Subject: [iText-questions] Re: indentation of columnText
> 
> 
> Thomas McKay writes:
> 
> > Just wondering if there's a way to indent the lines following the first
> line
> > of a paragraph.
> >
> > This is some text that wraps
> >   at the edge and indents
> >   six spaces on subsequent
> >   lines.
> >
> > I put some code into ColumnText.java to allow this to happen but there
> might
> > be a mechanism for this already.
> 
> No, there isn't.
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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



RE: [iText-questions] Re: indentation of columnText

2002-03-19 Thread Thomas McKay

Here's the code I added to ColumnText.java to set a "following indent."


CAFFEINE:...lowagie/text/pdf> cvs diff ColumnText.java
Index: ColumnText.java
===
RCS file: /cvsroot/itext/src/com/lowagie/text/pdf/ColumnText.java,v
retrieving revision 1.17
diff -r1.17 ColumnText.java
134a135,137
>
> /** The following paragraph lines indent. */
> protected float followingIndent = 0;
443a447,464
>  * Sets the following paragraph lines indent.
>  * @param indent the indent
>  */
> public void setFollowingIndent(float indent)
> {
> this.followingIndent = indent;
> }
>
> /**
>  * Gets the following paragraph lines indent.
>  * @return the indent
>  */
> public float getFollowingIndent()
> {
> return followingIndent;
> }
>
> /**
558c579
< firstIndent = line.isNewlineSplit() ? indent : 0;
---
> firstIndent = line.isNewlineSplit() ? indent :
followingIndent
;
595c616
< firstIndent = line.isNewlineSplit() ? indent : 0;
---
> firstIndent = line.isNewlineSplit() ? indent :
followingIndent
;
631c652
< }
\ No newline at end of file
---
> }

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 9:08 AM
To: Thomas McKay
Cc: iText
Subject: [iText-questions] Re: indentation of columnText


Thomas McKay writes:

> Just wondering if there's a way to indent the lines following the first
line
> of a paragraph.
>
> This is some text that wraps
>   at the edge and indents
>   six spaces on subsequent
>   lines.
>
> I put some code into ColumnText.java to allow this to happen but there
might
> be a mechanism for this already.

No, there isn't.

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


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



[iText-questions] Re: Two different alignments on a two column table

2002-03-19 Thread bruno

Ronald & KarenTooley writes:

> Hi, there must be an easy way to have two different alignments on a two column 
>table? I want the right hand column aligned right and the left hand column aligned 
>left. I know you can do this by setting the alignment each time you add a cell but is 
>there a global way to do it for the table?

Sorry, there isn't.
If you set a default, it's for the complete table,
not on a 'column'-basis.

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



[iText-questions] Re: Archives broken (sourceforge)

2002-03-19 Thread bruno

HardMax writes:

> Hi, 
> 
> it seems, that all the archives of iText/0.88 loaded up to 
> sourceforge.net are broken (checked twice, reason not figured 
> out yet).

So I see. Thanks for mentioning this. 

I uploaded them the files afternoon. I had a lot of trouble due
to the very slow connection to SF. I will try to upload them
again. 

kind regards,
Bruno

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



[iText-questions] Two different alignments on a two column table

2002-03-19 Thread Ronald & KarenTooley



Hi, there must be an easy way to have two different 
alignments on a two column table? I want the right hand 
column aligned right and the left hand column aligned left. I know you 
can do this by setting the alignment each time you add a cell but is there a 
global way to do it for the table?
 
Thanks Ron


[iText-questions] Re: indentation of columnText

2002-03-19 Thread bruno

Thomas McKay writes:

> Just wondering if there's a way to indent the lines following the first line
> of a paragraph. 
> 
> This is some text that wraps
>   at the edge and indents
>   six spaces on subsequent
>   lines. 
> 
> I put some code into ColumnText.java to allow this to happen but there might
> be a mechanism for this already.

No, there isn't.

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



[iText-questions] Re: HeaderFooter and extra page problem

2002-03-19 Thread bruno

[EMAIL PROTECTED] writes:

> If I use the onStartPage/onEndPage method of adding headers/footers, the
> document has some text squished together on the second and subsequent pages, and
> still has the extra page!

You may use onStartPage only to set variables. Not to add content.
Add content (such as a header or footer) in the onEndPage.

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



[iText-questions] HeaderFooter and extra page problem

2002-03-19 Thread Alan_Leung


I am using the HeaderFooter class.

For the header, my Phrase consists of a Table inside a Phrase.  However, my
footer is simply a Phrase that consists of a simple String.  What I add to the
Document are multiple Tables, each with setTableFitsPage(true).  These Tables
are used to properly layout each content "part" of the Document.

Everything looks quite good so far, the document handles the paging (I never
explicitly add a newPage() myself), the Table contents are kept together,
header/footer look OK.  But two problems:

1.  extra page at end of document.  Only the header and footer are on the page.
We need to get rid of this extra page
2.  different spacing between the header and first content "part" on a page,
when comparisons are done between the first page and subsequent pages

If I use the onStartPage/onEndPage method of adding headers/footers, the
document has some text squished together on the second and subsequent pages, and
still has the extra page!

I would appreciate help especially with what possible causes during my
construction of the document that would create the extra page.  If there are
relevant old mailing list articles, please point me to them.

Thank you.

Alan.



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



[iText-questions] Re: border in Tables from xml

2002-03-19 Thread bruno

Simon Moore writes:

>   Btw. I just thought you'd like to know what I'm using iText for.
> Basically, Pdf generation of various reports from db resultsets with
> preprocessing and generation of an xml file with the appropriate iText tags
> using jakarta-velocity.

Nice!
Sorry if the XML part of iText doesn't evolve as fast as I wish.
I still have some design issues to decide on (and I can't make
up my mind). 

kind regards,
Bruno

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