[iText-questions] ColumnText

2004-09-21 Thread Christian Lauer
Hi Paulo,

I'd like to enhance the support of ColumnText in UJAC. For that I'd like
to add a column text seamlessly to the document like other elements like
tables, paragraphs or lists do. To make that happen I need to know the
current page position. To get this, I tried the following workaround,
which works, but adds a huge spacing between the current text and the
column text. 


  public float getVerticalPosition() throws DocumentHandlerException {
try {
  Table tab = new Table(1);
  return ((PdfWriter) documentWriter).getTableBottom(tab);
} catch (BadElementException ex) {
  throw new DocumentHandlerException(locator(), ex.getMessage(),
ex);
}
  }


Is there a better solution?

Best regards,
Christian



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Vertical spacing control for ListItems

2004-09-21 Thread Christian Lauer
Hi Paulo,

first of all I'd like to thank you for the excellent support so far, I
really appreciate it!

I have played a bit with lists and have found out, that the ListItem 
class extends the Paragraph class. Then I tested the new vertical
spacing features of Paragraphs (spacingBefore and spacingAfter). I've
found out that it works only when rendered by a ColumnText, but not in
case the List is directly added to the document.

Best regards,
Christian

-- 
Christian Lauer <[EMAIL PROTECTED]>



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Problems with TIFF image

2004-09-21 Thread Xavier Le Vourch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm having problems with a TIFF image. It's processed correctly by iText
but Acrobat Reader will not display (or print) the resulting pdf file.
The offending TIFF ("5159762.tif"), another valid TIFF and the output of
the "read_tiffs.java" example on those two images are located on my server:
http://brittanysoftware.com/bugs/3605703.tif
http://brittanysoftware.com/bugs/5159762.tif
http://brittanysoftware.com/bugs/many_tiffs.pdf
The error in Acrobat Reader is "a drawing error occurred" on the second
page of the pdf file but the image file does not seem to be corrupted.
The tests are done with the paulo 138 version and displayed with Acrobat
Reader 6.0.2 but another user had problems with a different version of
the reader as well.
Is there any other way to insert the TIFF images? From previous messages
on the list, it seems that the JAI package has some limitations but
would it work better in this case?
Thanks,
Xavier
- --
Xavier Le Vourch
Brittany Software, Inc.
<[EMAIL PROTECTED]>
PGP Key: http://brittanysoftware.com/gpg_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBUO5uA3JYBYlsWUcRAtl5AJwJ3G4mYxT0MazeyCIaXwQGKRGnWQCfSW4a
0msw/WumaWI129MZSlo48MU=
=8y6+
-END PGP SIGNATURE-
---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Question : Error in opening iText Report in another pc.- Access is Denied.

2004-09-21 Thread Aidil Fitri
Hi to all..

I got this error.

I are using iText as a reporting tool, using EJB
architecture.

It works fine in my own pc. But, when I want to open
the iText report from another pc, 
it gives me javascript error : 

"Access is denied."

So, now, I just can view it in my pc only (as a
server) and cannot view it from another pc. (as a
client)

Below is my configuration.

Path / Structure: 

Lowagie Class in 
C:\myfolder\orion\com\lowagie 

JSP Path: 
C:\myfolder\..\src\jsp\testing\report\report.jsp 
(that call the report)

Java Path 
C:\myfolder\src\edu\testing\report\ejb 
(my ejb folder)

C:\myfolder\src\edu\testing\report\reports 
(my reports folder)

C:\myfolder\src\edu\testing\report\usecase 
(my usecase folder)

Report Path 
C:\myfolder\orion\config.properties 

in config.properties

report.path = C:/myfolder/src/jsp/reports
reportview.path = C:/myfolder/src/jsp/reports

in my report.java,
i open the report like this..

PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream(report.path+"/sampleRpt.pdf"));


Thanks.

Aidil.



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Using Watermarks

2004-09-21 Thread Paulo Soares
See the example headers_and_watermarks.java at itextpdf.sf.net.

Best Regards,
Paulo Soares

- Original Message - 
From: "Thomas Halliley" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 22:57
Subject: Re: [iText-questions] Using Watermarks


>
> Yes, I believe so.  There may have been an exception, but I don't think
so.
> If I comment out the watermark code, the PDF is generated just fine.
>
> Is there a good time or bad time to add the watermark?  Before
> document.open?  After document.open?
> In my case, I added the watermark after document.open.
>
> Tom
>
>
>
>   Tom HallileySr. Web Architect
>
>   BASF CorporationAutomotive Refinish
>Technologies
>
>   248.948.2376[EMAIL PROTECTED]
>
>
>
>
>
>
>
>
> |-++->
> | ||"Paulo Soares"   |
> | ||<[EMAIL PROTECTED]>|
> | || |
> | ||09/21/2004 03:27 PM  |
> | ||Please respond to|
> | ||"Paulo Soares"   |
> | || |
> |-++->
>
>---
-|
>   |  To:  "Thomas Halliley"
|
>   |  cc:  itext-questions
|
>   |   Subject:   Re: [iText-questions] Using Watermarks
|
>
>---
-|
> |-++->
> | || |
> |-++->
>
>---
-|
>   |
|
>
>---
-|
>
>
>
>
> The pdf is incomplete. Did you call document.close()?
>
> Best Regards,
> Paulo Soares
>
> - Original Message -
> From: "Thomas Halliley" <[EMAIL PROTECTED]>
> To: "Paulo Soares" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 21, 2004 17:59
> Subject: RE: [iText-questions] Using Watermarks
>
>
> >
> > Here's the corrupted PDF that Acrobat Reader cannot open.
> >
> > Tom
> >
> > (See attached file: invoice_000-000113125-000.pdf)
> >
> >
> >
> >   Tom HallileySr. Web Architect
> >
> >   BASF CorporationAutomotive Refinish
> >Technologies
> >
> >   248.948.2376[EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> >
> >
> > |-++->
> > | ||"Paulo Soares"   |
> > | ||<[EMAIL PROTECTED]>|
> | |
> > | ||09/21/2004 12:04 PM  |
> > | || |
> > |-++->
> >
>
>---
>
> -|
> >   |  To:  "Thomas Halliley", itext-questions
> |
> >   |  cc:
> |
> >   |   Subject:   RE: [iText-questions] Using Watermarks
> |
> >
>
>---
>
> -|
> > |-++->
> > | || |
> > |-++->
> >
>
>---
>
> -|
> >   |
> |
> >
>
>---
>
> -|
> >
> >
> >
> >
> > Post the pdf for inspection, if it's small.
> >
> > Best Regards,
> > Paulo Soares
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On
> > > Behalf Of Thomas Halliley
> > > Sent: Tuesday, September 21, 2004 3:32 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [iText-questions] Using Watermarks
> > >
> > > I'm trying to add a watermark to a PDF document, which
> > > appears to succeed,
> > > but the resulting PDF document is corrupted (unable to be opened by
> > > Acrobat).
> > > If I do not add the watermark, the PDF document is fine.
> > >
> > > Any ideas?
> > >
> > > ...
> > > document.open();
> > >
> > > StringwatermarkPath =
> > > "/some/path/images/watermark-nomail.gif";
> > > Watermark watermark = new
> > > Watermark(Watermark.getInstance(watermarkPath), 0.0f, 0.0f);
> > > watermar

Re: [iText-questions] AcroField with formatting and MaxLen

2004-09-21 Thread Paulo Soares
That's a bug. MaxLen should only be applied to the information that goes
into the /V key and not to the appearance. Next week I'll have a new release
with this fix and others.

Best Regards,
Paulo Soares

- Original Message - 
From: "Haroon Rafique" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 19:10
Subject: [iText-questions] AcroField with formatting and MaxLen


> Hi,
>
> First time poster here. I have read the archives and have been looking at
> the example source code on itext.sf.net as well, but haven't found
> anything similar to what I am experiencing. Please be gentle, in case I
> missed something obvious.
>
> I have a PDF with form fields that came from a third party. The security
> options for the PDF disallows "Authoring Comments and Form Fields". I have
> Adobe Acrobat 5.0.5. In any case, in one of the fields you are supposed to
> fill in some dollar amounts. The maximum characters that you can type in
> it is 6. I confirmed that MaxLen was 6 when I ran ListFields (program
> found in examples at itexts.sf.net) on the pdf file. Using Adobe Reader
> 6.0 (works the same with 5.x), I can enter 123456 in the field. When I hit
> tab, the field automatically changes to $123,456.00. I'm presuming that
> this happens because the field is of Number Format with Currency symbol
> and Decimal places set to 2.
>
> Here's my iText related question. I use PdfReader to read the file and
> PdfStamper to fill the fields with values. In order to be consistent with
> the Adobe Acrobat Reader behavior I was trying to fill in the values
> preformatted e.g, as $987,654.00. Unfortunately, (presumably since MaxLen
> is set to 6), using setField(), only the first 6 characters show up.
> That is, $987,6 which is a problem.
>
> So, my choices are to not format and display without dollar symbols and
> commas
> OR
> anyone else have any ideas? Could the MaxLen be modified programmatically
> and then filled in?
>
> Should I ask the 3rd party to fix the PDF? Be aware, however, that the 3rd
> party is of the government variety.
>
> Thanks in advance,
> --
> Haroon Rafique
> <[EMAIL PROTECTED]>
>
>
>
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDFPTable page splitting issues

2004-09-21 Thread Paulo Soares
Do your own layout. After all, you are already using writeSelectedRows(),
you don't need fitsPage().

Best Regards,
Paulo Soares

- Original Message - 
From: "Wellman, Daniel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 19:11
Subject: [iText-questions] PDFPTable page splitting issues



First off, thank you for creating such an excellent tool and for
providing a great community mailing list.  We are evaluating iText for
use in a project and are working on a proof-of-concept that involves the
following:

-  Headers and foots on every page

-  All the content is stored in a table to provide clean rows
and columns of data (no nested tables)

- Runs in a web application and sends response data to either the
local file system or to the HttpResponse



BACKGROUND:



We are doing this with PdfPTables for the content and page event
listeners for onEndPage to add headers and footers.  We use this method
as described in an earlier list message to determine if we have
surpassed our page boundary when iterating through our list of data to
print to the PDF file:



 // add content to table with addCell(Phrase) omitted here

 if (!writer.fitsPage(table, myMargin)) {

table.deleteLastRow();

i --;// decrement our loop counter to reprint the last
row on the new page

table.writeSelectedRows(0, -1,document.leftMargin(),
marginInfo, writer.getDirectContent());

document.newPage();

table = createTable(reportLayoutObject,tableCellLengths);

}



Note that in this case, we have one collection of all of the data to be
rendered, where each element contains one row of data.  This works
perfectly, as far as we can tell.





PROBLEM:



Now we are facing a problem on a different report which does something
like this:



Print a label row (i.e. "List of Foos:")

Loop through a collection of foo data and print out as in
the previous example

Print another label row (i.e. "List of Bars:")

Loop through a collection of bar data...

etc.





The problem I see here is that we only catch the write-past-end-of-page
condition when we are looping through a collection of data to print.
Printing the label rows runs the risk of printing beyond the page end;
if we try and call writer.fitsPage() and deleteLastRow() afterwards,
there's no way to get this label Row data back to reprint it.



This is similar to the problem/feature suggestion noted here:

http://sourceforge.net/mailarchive/message.php?msg_id=6510263





Here's my list of possible solutions - do these sound valid, or is there
one I'm missing?



1. Ideally I'd like to find out if the next row I'm about to write is
going to wrap and then create a new page.  However this requires knowing
the row height for the cells about to be written, and the dynamic row
data can wrap multiple lines.  Is there a way to get this projected row
height for the text and font and specific column of a row?



2. How about accessing the Row content and copying out the cells right
before deleteLastRow is called?  (It looks like getRow is
package-private)



3. Another solution I thought of was to create a "printRow" helper class
in our application which contains a list of cell data, with a
"printRow(PDFPTable, Document)" method which will print the row to the
table, check to see if it didn't fit, delete the last row, create a new
table, and then re-add the row to the new table .





Thanks for your advice!





Daniel Wellman



-

The message contains confidential and/or legally privileged

information and is intended for use by the indicated addressee.



If you are not the intended addressee: (a) any disclosure,

reproduction, distribution or action you take because of it is

strictly prohibited; (b) please return the complete message to the

sender; and (c) this message is not a solicitation for purchase or

sale or an agreement of any kind whatsoever that binds the sender.

-



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PdfPTable borders

2004-09-21 Thread Paulo Soares
I think a PdfPTableEvent is the way to go. It can cover not only a table
border but also an header border. A class could exist to do all this by
default and wouldn't be more difficult to use than set a rectangle.

Best Regards,
Paulo Soares

- Original Message - 
From: "Steve Appling" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 22:07
Subject: Re: [iText-questions] PdfPTable borders


> Perhaps I don't understand the use of PdfPTableEvent well enough.  If my
> table spans multiple pages, how can I use the information in the
> PdfPTableEvent to determine the appropriate borders?  Can I use the canvas
> to write across previous pages?  If so, then perhaps this would be better,
> although the changes to allow PdfPTable to have a border also seem fairly
> simple.  Here is what I did to evaluate this:
>
> In PdfPTable.writeSelectedRows(int colStart, int colEnd, int rowStart, int
> rowEnd, float xPos, float yPos, PdfContentByte[] canvases), I added  the
> following at the very end:
> setLeft(xPos);
> setRight(xPos + getTotalWidth());
> setTop(yPosStart);
> setBottom(yPos);
> Rectangle borderRect = new Rectangle(this);
> if (hasPreviousSubtables) {
>borderRect.disableBorderSide(Rectangle.TOP);
> }
> if (hasMoreSubtables) {
>borderRect.disableBorderSide(Rectangle.BOTTOM);
> }
> canvases[LINECANVAS].rectangle(borderRect);
>
> Note the new members hasPreviousSubtables and hasMoreSubtables (names
> debateable).  Other small changes to make sure new Rectangle properties
are
> copied appropriately.
>
> In ColumnText (starting at line 1279 of my version) I added:
> if (listIdx > 0) {
>nt.hasPreviousSubtables = true;
> }
> if (k < table.size()) {
>nt.hasMoreSubtables = true;
> }
>
> this is right before the line:
> nt.writeSelectedRows(0, -1, x1, yLineWrite, canvas);
>
> This seems fairly straightforward, but I don't quite follow all of the
> ColumnText code, so I may be missing something important.
>
> If this is something you would like to pursue, then I need to make some
> small changes to accomodate the variable width border code I am using.  I
> can do that and send you the two updated files.
>
> > - Original Message - 
> > From: "Paulo Soares" <[EMAIL PROTECTED]>
> > To: "Steve Appling" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 21, 2004 12:40 PM
> > Subject: RE: [iText-questions] PdfPTable borders
> >
>
> > You have PdfPTableEvent that it's a lot more flexible. How would you
> > implement the new border model?
> >
> >Best Regards,
> >Paulo Soares
>
>



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Using Watermarks

2004-09-21 Thread Thomas Halliley

Yes, I believe so.  There may have been an exception, but I don't think so.
If I comment out the watermark code, the PDF is generated just fine.

Is there a good time or bad time to add the watermark?  Before
document.open?  After document.open?
In my case, I added the watermark after document.open.

Tom
  

  
  Tom HallileySr. Web Architect   
  
  BASF CorporationAutomotive Refinish
   Technologies
  
  248.948.2376[EMAIL PROTECTED] 
  
   
  





|-++->
| ||"Paulo Soares"   |
| ||<[EMAIL PROTECTED]>|
| || |
| ||09/21/2004 03:27 PM  |
| ||Please respond to|
| ||"Paulo Soares"   |
| || |
|-++->
  
>|
  |  To:  "Thomas Halliley"
|
  |  cc:  itext-questions  
|
  |   Subject:   Re: [iText-questions] Using Watermarks
|
  
>|
|-++->
| || |
|-++->
  
>|
  |
|
  
>|




The pdf is incomplete. Did you call document.close()?

Best Regards,
Paulo Soares

- Original Message -
From: "Thomas Halliley" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 17:59
Subject: RE: [iText-questions] Using Watermarks


>
> Here's the corrupted PDF that Acrobat Reader cannot open.
>
> Tom
>
> (See attached file: invoice_000-000113125-000.pdf)
>
>
>
>   Tom HallileySr. Web Architect
>
>   BASF CorporationAutomotive Refinish
>Technologies
>
>   248.948.2376[EMAIL PROTECTED]
>
>
>
>
>
>
>
>
> |-++->
> | ||"Paulo Soares"   |
> | ||<[EMAIL PROTECTED]>|
| |
> | ||09/21/2004 12:04 PM  |
> | || |
> |-++->
>
>---

-|
>   |  To:  "Thomas Halliley", itext-questions
|
>   |  cc:
|
>   |   Subject:   RE: [iText-questions] Using Watermarks
|
>
>---

-|
> |-++->
> | || |
> |-++->
>
>---

-|
>   |
|
>
>---

-|
>
>
>
>
> Post the pdf for inspection, if it's small.
>
> Best Regards,
> Paulo Soares
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Thomas Halliley
> > Sent: Tuesday, September 21, 2004 3:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: [iText-questions] Using Watermarks
> >
> > I'm trying to add a watermark to a PDF document, which
> > appears to succeed,
> > but the resulting P

Re: [iText-questions] Paragraph fits page

2004-09-21 Thread Paulo Soares
Use ColumnText and do you own layout calculations, it never fails. Use the
version at itextpdf.sf.net.

Best Regards,
Paulo Soares

- Original Message - 
From: "Sheldon Fernandes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 13:23
Subject: [iText-questions] Paragraph fits page


> Hi,
>
> I need to know if there is a way to find out if a paragraph fits on a
page,
> before actually inserting the paragraph. Something similar to
> fitsPage(Table).
>
> Actually the problem we are facing is that even though the paragraph just
> fits the page, the startPage() event is getting called. Here we are
changing
> the margins for the next page. So the next page margins are wrongly
getting
> set to the current page margin (even though the current page text does not
> overflow). We need to set new margins for the next page, when the text
does
> not overflow to the next page.
>
> Note: The Text is dynamically picked up from the database. So we cannot
> control that.
>
> I have been struggling with this for more than a week. Any help would be
> greatly appreciated.
> Thanks in advance,
> Sheldon
>
>
>
> --
--
> Disclaimer: This e-mail message along with attachment, contain Patni GE
Confidential, proprietary & legally privileged information for the sole use
of the person or entity to whom this message was originally addressed. Any
review, e-transmission dissemination or other use of or taking of any action
in reliance upon this information by persons or entities other than the
intended recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this mail
has been forwarded to you without proper authority, please notify the sender
and delete this mail. This email (in whole or in part) is not to be
reproduced or furnished to third parties or made public without the prior
express written permission of the sender.
> --
--
>



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Using Watermarks

2004-09-21 Thread Paulo Soares
The pdf is incomplete. Did you call document.close()?

Best Regards,
Paulo Soares

- Original Message - 
From: "Thomas Halliley" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 17:59
Subject: RE: [iText-questions] Using Watermarks


>
> Here's the corrupted PDF that Acrobat Reader cannot open.
>
> Tom
>
> (See attached file: invoice_000-000113125-000.pdf)
>
>
>
>   Tom HallileySr. Web Architect
>
>   BASF CorporationAutomotive Refinish
>Technologies
>
>   248.948.2376[EMAIL PROTECTED]
>
>
>
>
>
>
>
>
> |-++->
> | ||"Paulo Soares"   |
> | ||<[EMAIL PROTECTED]>|
> | || |
> | ||09/21/2004 12:04 PM  |
> | || |
> |-++->
>
>---
-|
>   |  To:  "Thomas Halliley", itext-questions
|
>   |  cc:
|
>   |   Subject:   RE: [iText-questions] Using Watermarks
|
>
>---
-|
> |-++->
> | || |
> |-++->
>
>---
-|
>   |
|
>
>---
-|
>
>
>
>
> Post the pdf for inspection, if it's small.
>
> Best Regards,
> Paulo Soares
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Thomas Halliley
> > Sent: Tuesday, September 21, 2004 3:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: [iText-questions] Using Watermarks
> >
> > I'm trying to add a watermark to a PDF document, which
> > appears to succeed,
> > but the resulting PDF document is corrupted (unable to be opened by
> > Acrobat).
> > If I do not add the watermark, the PDF document is fine.
> >
> > Any ideas?
> >
> > ...
> > document.open();
> >
> > StringwatermarkPath =
> > "/some/path/images/watermark-nomail.gif";
> > Watermark watermark = new
> > Watermark(Watermark.getInstance(watermarkPath), 0.0f, 0.0f);
> > watermark.setRotationDegrees(-45.0f);
> >
> > if (document.add(watermark)) {
> >Log("Watermark added.");
> > } else {
> >Log("Watermark NOT added.");
> > }
> >
> >
> > Tom
> >
> >
> >
> >
> >
> >
> >   Tom HallileySr. Web
> > Architect
> >
> >
> >   BASF CorporationAutomotive
> > Refinish
> >Technologies
> >
> >
> >
> >
> > 248.948.2376[EMAIL PROTECTED] > >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ---
> > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> > Project Admins to receive an Apple iPod Mini FREE for your
> > judgement on
> > who ports your project to Linux PPC the best. Sponsored by IBM.
> > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> > ___
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
>
>
>
>
>
>



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PdfPTable borders

2004-09-21 Thread Steve Appling
Perhaps I don't understand the use of PdfPTableEvent well enough.  If my
table spans multiple pages, how can I use the information in the
PdfPTableEvent to determine the appropriate borders?  Can I use the canvas
to write across previous pages?  If so, then perhaps this would be better,
although the changes to allow PdfPTable to have a border also seem fairly
simple.  Here is what I did to evaluate this:

In PdfPTable.writeSelectedRows(int colStart, int colEnd, int rowStart, int
rowEnd, float xPos, float yPos, PdfContentByte[] canvases), I added  the
following at the very end:
setLeft(xPos);
setRight(xPos + getTotalWidth());
setTop(yPosStart);
setBottom(yPos);
Rectangle borderRect = new Rectangle(this);
if (hasPreviousSubtables) {
   borderRect.disableBorderSide(Rectangle.TOP);
}
if (hasMoreSubtables) {
   borderRect.disableBorderSide(Rectangle.BOTTOM);
}
canvases[LINECANVAS].rectangle(borderRect);

Note the new members hasPreviousSubtables and hasMoreSubtables (names
debateable).  Other small changes to make sure new Rectangle properties are
copied appropriately.

In ColumnText (starting at line 1279 of my version) I added:
if (listIdx > 0) {
   nt.hasPreviousSubtables = true;
}
if (k < table.size()) {
   nt.hasMoreSubtables = true;
}

this is right before the line:
nt.writeSelectedRows(0, -1, x1, yLineWrite, canvas);

This seems fairly straightforward, but I don't quite follow all of the
ColumnText code, so I may be missing something important.

If this is something you would like to pursue, then I need to make some
small changes to accomodate the variable width border code I am using.  I
can do that and send you the two updated files.

> - Original Message - 
> From: "Paulo Soares" <[EMAIL PROTECTED]>
> To: "Steve Appling" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> Sent: Tuesday, September 21, 2004 12:40 PM
> Subject: RE: [iText-questions] PdfPTable borders
>

> You have PdfPTableEvent that it's a lot more flexible. How would you
> implement the new border model?
>
>Best Regards,
>Paulo Soares




---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] PDFPTable page splitting issues

2004-09-21 Thread Wellman, Daniel








First off, thank you for creating such an excellent tool and
for providing a great community mailing list.  We are evaluating iText for
use in a project and are working on a proof-of-concept that involves the
following:

- 
Headers and foots on every page

- 
All the content is stored in a table to provide clean rows and columns
of data (no nested tables)

- Runs
in a web application and sends response data to either the local file system or
to the HttpResponse

 

BACKGROUND: 

 

We are doing this with PdfPTables for the content and page
event listeners for onEndPage to add headers and footers.  We use this
method as described in an earlier list message to determine if we have
surpassed our page boundary when iterating through our list of data to print to
the PDF file:  

 

 // add
content to table with addCell(Phrase) omitted here

 if
(!writer.fitsPage(table, myMargin)) {

   
table.deleteLastRow();

   
i --;    // decrement our loop counter to reprint the last row
on the new page

   
table.writeSelectedRows(0, -1,document.leftMargin(), marginInfo,
writer.getDirectContent());

   
document.newPage();

   
table = createTable(reportLayoutObject,tableCellLengths);

    }

 

Note that in this case, we have one collection of all of the
data to be rendered, where each element contains one row of data.  This
works perfectly, as far as we can tell.

 

 

PROBLEM: 

 

Now we are facing a problem on a different report which does
something like this:

 

   
Print a label row (i.e. “List of Foos:”)

   
Loop through a collection of foo data and print out as in the previous example

   
Print another label row (i.e. “List of Bars:”)

   
Loop through a collection of bar data…

   
etc.

 

 

The problem I see here is that we only catch the write-past-end-of-page
condition when we are looping through a collection of data to print. 
Printing the label rows runs the risk of printing beyond the page end; if we
try and call writer.fitsPage() and deleteLastRow() afterwards, there’s no
way to get this label Row data back to reprint it.

 

This is similar to the problem/feature suggestion noted
here:

http://sourceforge.net/mailarchive/message.php?msg_id=6510263

 

 

Here’s my list of possible solutions – do these
sound valid, or is there one I’m missing?

 

1. Ideally I’d like to find out if the next row
I’m about to write is going to wrap and then create a new page. 
However this requires knowing the row height for the cells about to be written,
and the dynamic row data can wrap multiple lines.  Is there a way to get
this projected row height for the text and font and specific column of a row?

 

2. How about accessing the Row content and copying out the
cells right before deleteLastRow is called?  (It looks like getRow is
package-private)

 

3. Another solution I thought of was to create a
“printRow” helper class in our application which contains a list of
cell data, with a “printRow(PDFPTable, Document)” method which will
print the row to the table, check to see if it didn’t fit, delete the
last row, create a new table, and then re-add the row to the new table .  

 

 

Thanks for your advice!

 

 

Daniel Wellman







-

The message contains confidential and/or legally privileged

information and is intended for use by the indicated addressee. 



If you are not the intended addressee: (a) any disclosure,

reproduction, distribution or action you take because of it is

strictly prohibited; (b) please return the complete message to the

sender; and (c) this message is not a solicitation for purchase or

sale or an agreement of any kind whatsoever that binds the sender.

-


[iText-questions] AcroField with formatting and MaxLen

2004-09-21 Thread Haroon Rafique
Hi,
First time poster here. I have read the archives and have been looking at 
the example source code on itext.sf.net as well, but haven't found 
anything similar to what I am experiencing. Please be gentle, in case I 
missed something obvious.

I have a PDF with form fields that came from a third party. The security 
options for the PDF disallows "Authoring Comments and Form Fields". I have 
Adobe Acrobat 5.0.5. In any case, in one of the fields you are supposed to 
fill in some dollar amounts. The maximum characters that you can type in 
it is 6. I confirmed that MaxLen was 6 when I ran ListFields (program 
found in examples at itexts.sf.net) on the pdf file. Using Adobe Reader 
6.0 (works the same with 5.x), I can enter 123456 in the field. When I hit 
tab, the field automatically changes to $123,456.00. I'm presuming that 
this happens because the field is of Number Format with Currency symbol 
and Decimal places set to 2.

Here's my iText related question. I use PdfReader to read the file and 
PdfStamper to fill the fields with values. In order to be consistent with 
the Adobe Acrobat Reader behavior I was trying to fill in the values 
preformatted e.g, as $987,654.00. Unfortunately, (presumably since MaxLen 
is set to 6), using setField(), only the first 6 characters show up. 
That is, $987,6 which is a problem.

So, my choices are to not format and display without dollar symbols and 
commas
OR
anyone else have any ideas? Could the MaxLen be modified programmatically 
and then filled in?

Should I ask the 3rd party to fix the PDF? Be aware, however, that the 3rd 
party is of the government variety.

Thanks in advance,
--
Haroon Rafique
<[EMAIL PROTECTED]>

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Using Watermarks

2004-09-21 Thread Thomas Halliley

Here's the corrupted PDF that Acrobat Reader cannot open.

Tom

(See attached file: invoice_000-000113125-000.pdf)
  

  
  Tom HallileySr. Web Architect   
  
  BASF CorporationAutomotive Refinish
   Technologies
  
  248.948.2376[EMAIL PROTECTED] 
  
   
  





|-++->
| ||"Paulo Soares"   |
| ||<[EMAIL PROTECTED]>|
| || |
| ||09/21/2004 12:04 PM  |
| || |
|-++->
  
>|
  |  To:  "Thomas Halliley", itext-questions   
|
  |  cc:   
|
  |   Subject:   RE: [iText-questions] Using Watermarks
|
  
>|
|-++->
| || |
|-++->
  
>|
  |
|
  
>|




Post the pdf for inspection, if it's small.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Thomas Halliley
> Sent: Tuesday, September 21, 2004 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Using Watermarks
>
> I'm trying to add a watermark to a PDF document, which
> appears to succeed,
> but the resulting PDF document is corrupted (unable to be opened by
> Acrobat).
> If I do not add the watermark, the PDF document is fine.
>
> Any ideas?
>
> ...
> document.open();
>
> StringwatermarkPath =
> "/some/path/images/watermark-nomail.gif";
> Watermark watermark = new
> Watermark(Watermark.getInstance(watermarkPath), 0.0f, 0.0f);
> watermark.setRotationDegrees(-45.0f);
>
> if (document.add(watermark)) {
>Log("Watermark added.");
> } else {
>Log("Watermark NOT added.");
> }
>
>
> Tom
>
>
>
>
>
>
>   Tom HallileySr. Web
> Architect
>
>
>   BASF CorporationAutomotive
> Refinish
>Technologies
>
>
>
>
> 248.948.2376[EMAIL PROTECTED] >
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your
> judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>







invoice_000-000113125-000.pdf
Description: Adobe PDF document


Re: [iText-questions] Vertical alignment in PdfPCells

2004-09-21 Thread Steve Appling
Thanks for catching that bug, Paulo.  Here is a revised version of
ColumnText that handles composite elements correctly (I think :).  At least
I have a simple test case that failed before and now works.  I also changed
ColumnText.duplicate to use setACopy (just avoiding a small amount of code
duplication).

I added the code to copy the useAscender flag directly to the goComposite
method since that is how everything else is copied.  Would it be better to
use setACopy to copy all of the ColumnText fields, then override a few with
parameters from the added Element?  It would be nice to have the bulk of
parameter copying in one place.

Thanks again for pointing out the problem.

- Original Message - 
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
<[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 11:38 AM
Subject: RE: [iText-questions] Vertical alignment in PdfPCells


A composite element is an element added with ColumntText.addElement(),
it's the same with PdfPCell. The processing is done in
ColumnText.goComposite(). If firstPass == true and it's a Paragraph or a
List you'll have to pass to the constructed ColumnText the Ascent flag.

Best Regards,
Paulo Soares

> -Original Message-
> From: Steve Appling [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 21, 2004 3:51 PM
> To: Paulo Soares; iText Mailing List
> Subject: Re: [iText-questions] Vertical alignment in PdfPCells
>
> I'll be glad to try fix any problems with this, but I'm not
> sure exactly
> what you mean by composite elements (which is probably why I
> didn't handle
> it right originally :).  If you can describe the problem
> condition enough
> for me to make a test case, I'll work on it.
>
> > - Original Message - 
> > From: "Paulo Soares" <[EMAIL PROTECTED]>
> > To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
> <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 21, 2004 9:51 AM
> >Subject: RE: [iText-questions] Vertical alignment in PdfPCells
> >
>
> > Good work. It needs some changes to support composite
> elements, though.
> >
> > Best Regards,
> > Paulo Soares
>
>
>


ColumnText.java
Description: java/


[iText-questions] HTMLWorker and accents (é,à,etc.)

2004-09-21 Thread Rémi Guilbert
Hi,
Is it possible to convert a html file that contains some accents (é, à, 
etc.)?

If HTMLWorker can't, what I can do to make it possible?
---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] html to pdf ...

2004-09-21 Thread Rémi Guilbert
Hi,
Inside your HTMLWorker, you have some supported tags.  I just want to know 
if these properties of tags are supported ?
colspan, rowspan, border, cellspacing, cellpading, width, heigth
If these properties are not supported, is it realizable ?
Thank's !!
Rémi 











  
  
  

  
  

  
  

  
  

  
  

  
  


  
  SÉANCE DU COMITÉ EXÉCUTIF
  

  
  


  
   Extrait du procès-verbal du comité exécutif de la Ville de Québec, tenue le 21 avril 2004, à l'hôtel de ville de Québec, 2, rue des Jardins, Québec
  

  
  

  
  


  
  300
  
  

Dépôt de l'état des revenus et dépenses et de la  projection trimestrielle pour l'exercice financier _- Virements et ajouts budgétaires (si requis)


 

 


 

Bonjour Brigitte


 
  Es-tu encore sceptique ?$*)(
  

  
  
  

  
  
  


  
  Ceci est une note avant la résolution
  

  
  


  
  De prendre acte de l'état des revenus et dépenses et de la __ projection trimestrielle pour l'exercice financier 2003.
Si requis
D'autoriser les virement budgétaires décrits à l'annexe ___  en date du __, jointe au sommaire décisionnel __, pour un montant de ___$.
D'autoriser les ajouts budgétaires décrits à l'annexe  en date du _, jointe au sommaire décisionnel _, pour un montant de _$.
Test pour tag html
Texte gras
Texte italic
Texte souligné
Texte aligné à gauche
Texte centré
Texte aligné à droite
Liste numéroté


item 1.

item 2.

item 3
 
Liste point


point 1

point 2

point 3
 

Paragraphe en retrait
Paragraphe normal
Insertion d'image : 
Insertion de lien internet : http://www.yahou.com



Texte normal
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

Directory list
menu list
formated
Font :
arial
arial balck
comic sans ms
Courier new
Geogia
Impact
Lucida Consol
Palatino Linotype
Tahoma
Times new roman
Trebuchet MS
Verdana
size 1
size 2
size 3
size 4
size 5
size 6
Purpule
Aquamarine
 
  

  
  


  
  Ceci est une note après la résolution
  

  
  


  
  (Signé)
  
  Josette Tessier
  
  (Signé)
  
  Josette Tessier
  

  
  
  
  
  


  
  Greffière
  
  Greffière
  

  
  
  





RGUILBER.PDF
Description: Adobe PDF document


test.jsp
Description: Binary data


[iText-questions] Paragraph fits page

2004-09-21 Thread Sheldon Fernandes
Hi,

I need to know if there is a way to find out if a paragraph fits on a page,
before actually inserting the paragraph. Something similar to
fitsPage(Table).

Actually the problem we are facing is that even though the paragraph just
fits the page, the startPage() event is getting called. Here we are changing
the margins for the next page. So the next page margins are wrongly getting
set to the current page margin (even though the current page text does not
overflow). We need to set new margins for the next page, when the text does
not overflow to the next page.

Note: The Text is dynamically picked up from the database. So we cannot
control that.

I have been struggling with this for more than a week. Any help would be
greatly appreciated.
Thanks in advance,
Sheldon




Disclaimer: This e-mail message along with attachment, contain Patni GE Confidential, 
proprietary & legally privileged information for the sole use of the person or entity 
to whom this message was originally addressed. Any review, e-transmission 
dissemination or other use of or taking of any action in reliance upon this 
information by persons or entities other than the intended recipient is prohibited. If 
you have received this e-mail in error kindly delete this e-mail from your records. If 
it appears that this mail has been forwarded to you without proper authority, please 
notify the sender and delete this mail. This email (in whole or in part) is not to be 
reproduced or furnished to third parties or made public without the prior express 
written permission of the sender.



[iText-questions] HTMLWorker ...

2004-09-21 Thread Rémi Guilbert
Hi,
I keep only the jar files inside my project.  I have itext-paulo-138.jar,
itext-xml-1.02.jar and xerces 1.4.4.jar.  I clear my classes directory and I
recompiled.  I got these errors
-
C:\Ora9ias\jdev\mywork\GPDDEV\GPDDEV\src\com\lowagie\text\html\simpleparser\HTMLWorker.java
   Error(86,25): method
parse(com.lowagie.text.html.simpleparser.HTMLWorker, null, java.io.Reader,
boolean) not found in class
   com.lowagie.text.pdf.SimpleXMLParser
-
C:\Ora9ias\jdev\mywork\GPDDEV\GPDDEV\src\com\lowagie\text\html\simpleparser\FactoryProperties.java
   Error(86,11): method setLeading(int, float) not found in class
com.lowagie.text.Paragraph
   Error(101,11): method setLeading(int, float) not found in class
com.lowagie.text.Paragraph
-
C:\Ora9ias\jdev\mywork\GPDDEV\GPDDEV\src\com\lowagie\text\html\simpleparser\IncCell.java
   Error(105,14): method addElement(com.lowagie.text.Element) not found
in class com.lowagie.text.pdf.PdfPCell
What is the problem ?
Thank's !!
Rémi 

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] PdfPTable borders

2004-09-21 Thread Paulo Soares
You have PdfPTableEvent that it's a lot more flexible. How would you
implement the new border model?

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Steve Appling
> Sent: Tuesday, September 21, 2004 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] PdfPTable borders
> 
> PdfPTable isn't derived from Rectangle like Table is, so it 
> doesn't have
> borders itself, just on the cells.  I'm converting some code to use
> PdfPTable instead of Table and the lack of table level 
> borders is a bit of a
> problem.  My cells are added in an event driven manner (from 
> a SAX data
> source) so I can't tell that I'm on the last row until after 
> I have added
> the final row of cells.  I can't force a bottom border on the 
> last row.
>
> How would everyone (particularly Paulo) feel about making 
> PdfPTable derived
> from Rectangle?  Was there a particular reason that PdfPTable 
> does this
> differently than Table?


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] (no subject)

2004-09-21 Thread Paulo Soares
You have to use a List.

Best Regards,
Paulo Soares 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, September 21, 2004 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] (no subject)
> 
> Can anyone give me some guidence on how to get the following 
> effect (wrapping as
> in paragraph 1.1.1.) :
> 
> 1. Introduction
> 
> 1.1.  View
> 
> 1.1.1. This is where the problem comes in.. I want the 
> wrapping to start in
>line with the first paragraph line start. And then 
> keep doing so with the
>other lines..
> 
> NOT like this...
> 1.1.2. This is where the problem comes in.. I want the 
> wrapping to start line h
> the first line start. And then keep doing so on all the other lines..
> 
> THANKS!!
> Giovanni Roos
> 
> 
> 
> 
> 
> This message was sent using IMP, the Internet Messaging Program.
> 
> 
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your 
> judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Chaper/Section headings and bookmark labels

2004-09-21 Thread Paulo Soares
I can add that feature, it's easy.

Best Regards,
Paulo Soares 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Bruno Lowagie
> Sent: Tuesday, September 21, 2004 11:05 AM
> To: Simon Brunning
> Cc: [EMAIL PROTECTED]
> Subject: Re: [iText-questions] Chaper/Section headings and 
> bookmark labels
> 
> Simon Brunning wrote:
> 
> >I do have a question, though. I'm using chapters and sections to
> >organise my document, and it's working really well. But I'd like the
> >text of the chapter and section headers that appear in the 
> dicument to
> >be different to the bookmark labels.
> >
> In what way different? How would you want to control the 
> difference between
> the title in the texts and the title in the bookmarks (= 
> outlines). Is 
> there an algorythm
> to convert the actual title into the bookmark title or do you want to 
> enter the
> bookmark title while adding the Section/Chapter?
> 
> > Is this possible?
> >
> Not for the moment. PdfDocument reads the title from the Chapter
> and puts it on the PDF as well as in the outlinetree.
> 
> > How might I go about it?
> >  
> >
> Maybe PageEvents are a solution.
> Ease of use is probably the main reason why you are using 
> Chapters/Sections,
> but you could also use GenericTags and build your 
> outlinetree/bookmarks
> with PageEvents. It may sound more complicated, but it will 
> give you a lot
> of extra flexibility (and it isn't that hard to achieve). 
> Maybe it would 
> be good
> to give an example so that the mailinglist subscriber can 
> suggest a solution
> that fits the problem.
> br,
> Bruno
> 
> 
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your 
> judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Using Watermarks

2004-09-21 Thread Paulo Soares
Post the pdf for inspection, if it's small.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Thomas Halliley
> Sent: Tuesday, September 21, 2004 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Using Watermarks
> 
> I'm trying to add a watermark to a PDF document, which 
> appears to succeed,
> but the resulting PDF document is corrupted (unable to be opened by
> Acrobat).
> If I do not add the watermark, the PDF document is fine.
> 
> Any ideas?
> 
> ...
> document.open();
> 
> StringwatermarkPath = 
> "/some/path/images/watermark-nomail.gif";
> Watermark watermark = new
> Watermark(Watermark.getInstance(watermarkPath), 0.0f, 0.0f);
> watermark.setRotationDegrees(-45.0f);
> 
> if (document.add(watermark)) {
>Log("Watermark added.");
> } else {
>Log("Watermark NOT added.");
> }
> 
> 
> Tom
>   
> 
> 
> 
>   
> 
>   Tom HallileySr. Web 
> Architect   
>   
> 
>   BASF CorporationAutomotive 
> Refinish
>Technologies
> 
>   
> 
>   
> 248.948.2376[EMAIL PROTECTED] > 
>   
> 
>
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your 
> judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] PdfPTable borders

2004-09-21 Thread Steve Appling
PdfPTable isn't derived from Rectangle like Table is, so it doesn't have
borders itself, just on the cells.  I'm converting some code to use
PdfPTable instead of Table and the lack of table level borders is a bit of a
problem.  My cells are added in an event driven manner (from a SAX data
source) so I can't tell that I'm on the last row until after I have added
the final row of cells.  I can't force a bottom border on the last row.

How would everyone (particularly Paulo) feel about making PdfPTable derived
from Rectangle?  Was there a particular reason that PdfPTable does this
differently than Table?




---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Attaching an Image to a Rtf Document

2004-09-21 Thread Mark Hall
On Tuesday 21 September 2004 09:33, eran bergman wrote:
> document.open();
> com.lowagie.text.Image jpeg = com.lowagie.text.Image.getInstance(path);
> //works fine jpeg.setAlignment(com.lowagie.text.Image.MIDDLE);
> document.add(jpeg); //takes a long time
>  
> it seems to work fine cos I get a large rtf file (104K instead if 38K
> without the Image - (Image  size 33K)), I also get a message from MS Word
> telling me the "system does not have enough disk space or memory to
> complete the action" and I only get the rest of the text I added to the
> Document. 
Does it work if you add the image to the document in Word? If yes, could you 
privately send me either the document or the jpeg file.

Greetings,
Mark
-- 
A witty saying proves nothing.
  -- Voltaire

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc


pgpBfjBZQwEX6.pgp
Description: PGP signature


[iText-questions] (no subject)

2004-09-21 Thread groos
Can anyone give me some guidence on how to get the following effect (wrapping as
in paragraph 1.1.1.) :

1. Introduction

1.1.  View

1.1.1. This is where the problem comes in.. I want the wrapping to start in
   line with the first paragraph line start. And then keep doing so with the
   other lines..

NOT like this...
1.1.2. This is where the problem comes in.. I want the wrapping to start line h
the first line start. And then keep doing so on all the other lines..

THANKS!!
Giovanni Roos





This message was sent using IMP, the Internet Messaging Program.


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Vertical alignment in PdfPCells

2004-09-21 Thread Paulo Soares
A composite element is an element added with ColumntText.addElement(),
it's the same with PdfPCell. The processing is done in
ColumnText.goComposite(). If firstPass == true and it's a Paragraph or a
List you'll have to pass to the constructed ColumnText the Ascent flag.

Best Regards,
Paulo Soares 

> -Original Message-
> From: Steve Appling [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 21, 2004 3:51 PM
> To: Paulo Soares; iText Mailing List
> Subject: Re: [iText-questions] Vertical alignment in PdfPCells
> 
> I'll be glad to try fix any problems with this, but I'm not 
> sure exactly
> what you mean by composite elements (which is probably why I 
> didn't handle
> it right originally :).  If you can describe the problem 
> condition enough
> for me to make a test case, I'll work on it.
> 
> > - Original Message - 
> > From: "Paulo Soares" <[EMAIL PROTECTED]>
> > To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
> <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 21, 2004 9:51 AM
> >Subject: RE: [iText-questions] Vertical alignment in PdfPCells
> >
> 
> > Good work. It needs some changes to support composite 
> elements, though.
> >
> > Best Regards,
> > Paulo Soares
> 
> 
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Vertical alignment in PdfPCells

2004-09-21 Thread Steve Appling
I'll be glad to try fix any problems with this, but I'm not sure exactly
what you mean by composite elements (which is probably why I didn't handle
it right originally :).  If you can describe the problem condition enough
for me to make a test case, I'll work on it.

> - Original Message - 
> From: "Paulo Soares" <[EMAIL PROTECTED]>
> To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
<[EMAIL PROTECTED]>
> Sent: Tuesday, September 21, 2004 9:51 AM
>Subject: RE: [iText-questions] Vertical alignment in PdfPCells
>

> Good work. It needs some changes to support composite elements, though.
>
> Best Regards,
> Paulo Soares




---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Using Watermarks

2004-09-21 Thread Thomas Halliley
I'm trying to add a watermark to a PDF document, which appears to succeed,
but the resulting PDF document is corrupted (unable to be opened by
Acrobat).
If I do not add the watermark, the PDF document is fine.

Any ideas?

...
document.open();

StringwatermarkPath = "/some/path/images/watermark-nomail.gif";
Watermark watermark = new
Watermark(Watermark.getInstance(watermarkPath), 0.0f, 0.0f);
watermark.setRotationDegrees(-45.0f);

if (document.add(watermark)) {
   Log("Watermark added.");
} else {
   Log("Watermark NOT added.");
}


Tom
  

  
  Tom HallileySr. Web Architect   
  
  BASF CorporationAutomotive Refinish
   Technologies
  
  248.948.2376[EMAIL PROTECTED] 
  
   
  







---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Vertical alignment in PdfPCells

2004-09-21 Thread Paulo Soares
Good work. It needs some changes to support composite elements, though.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Steve Appling
> Sent: Tuesday, September 21, 2004 1:51 PM
> To: iText Mailing List
> Subject: Re: [iText-questions] Vertical alignment in PdfPCells
> 
> I'll try this again - the mailing list rejected my first 
> email because it
> had a zip in it.  The attached file is really a zip, rename 
> it and change
> the extension to zip.
> 
> I encountered a similar problem and added setUseAscender to 
> PdfPCell and
> ColumnText.  This allows you to have appropriate vertical alignment
> regardless of font.  I have a few other changes including
> setUseBorderPadding (which adjusts the padding based on 
> border widths) and
> support for variable color / width borders on each side of a PdfPCell.
> 
> I have attached my changed source as a zip that can be 
> applied on top of
> itext-paulo-138.
> 
> If you only want the useAscender part, you only need the useAscender
> setter/getter from PdfPCell, and the updated ColumnText and PdfLine.
> 
> Enjoy!
> 
> - Original Message - 
> From: "Christian Lauer" <[EMAIL PROTECTED]>
> To: "iText Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 21, 2004 2:20 AM
> Subject: [iText-questions] Vertical alignment in PdfPCells
> 
> 
> > Hi Paulo,
> >
> > an UJAC user had a interesting question about vertical alignment in
> > PdfPCells. The problem he discovered is that you can't 
> really perform a
> > top or middle alignment, not even with fixed leading set to zero and
> > multiplied leading set to 1.0. There will always be a 
> little extra space
> > between the top of the cell and the contents.
> >
> > And the workaround by manipulating the paddingTop attribute 
> is no ideal
> > solution too because it depends on the font size that's used.
> >
> > Is there a real solution for that problem?
> >
> > I've attached an test programm, which produces the problem.
> >
> > Best regards,
> > Christian
> >
> > -- 
> > Christian Lauer <[EMAIL PROTECTED]>
> >
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] FdfReader bug

2004-09-21 Thread Paulo Soares
Title: FdfReader bug



The only fix that needs to be done is in the fdf file. Parenthesis 
must be escaped or balanced.
 
Best Regards,
Paulo Soares

  
  
  From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  Malloy, JamesSent: Tuesday, September 21, 2004 2:08 
  PMTo: [EMAIL PROTECTED]Subject: 
  [iText-questions] FdfReader bug
  
  It appears that if there are uneven parenthesis in the 
  fdf data then Itext crashes while parsing the fdf file. example:  /V     
  ((Bonnie Broker)     
  >> 
  I understand the cause of the problem but have no idea 
  how to fix it. 
  The cause is currently in PRTokenizer whenever char '(' 
  is encountered a nested int is incremented. Whenever ')' is encountered it is 
  decreased. The first '(' is not included in the counts. When the nested int 
  hits -1 it the current loop is escaped. What occures when there is uneven 
  nested parenthesis is -1 is never reached. 
  In the example above: First '('  ignored Second 
  '('    
  nested++  value 1 
  does test of Bonnie Broker Closing ')' nested -- value 0 
  since the value is zero after the last parenthesis it 
  never escapes form the read loop. 
  I've looked into fixing the problem myself but with no 
  sucess. Has anyone figured out a fix to this problem? 
  Jim Malloy Enterprise 
  Application Services 
  -This e-mail 
  transmission may contain information that is proprietary, privileged and/or 
  confidential and is intended exclusively for the person(s) to whom it is 
  addressed. Any use, copying, retention or disclosure by any person other than 
  the intended recipient or the intended recipient's designees is strictly 
  prohibited. If you are not the intended recipient or their designee, please 
  notify the sender immediately by return e-mail and delete all copies. 
  -


[iText-questions] FdfReader bug

2004-09-21 Thread Malloy, James
Title: FdfReader bug






It appears that if there are uneven parenthesis in the fdf data then Itext crashes while parsing the fdf file. 

example:

 /V

    ((Bonnie Broker)

    >>


I understand the cause of the problem but have no idea how to fix it. 


The cause is currently in PRTokenizer whenever char '(' is encountered a nested int is incremented. Whenever ')' is encountered it is decreased. The first '(' is not included in the counts. When the nested int hits -1 it the current loop is escaped. What occures when there is uneven nested parenthesis is -1 is never reached. 

In the example above:

First '('  ignored

Second '('    nested++  value 1

does test of Bonnie Broker

Closing ')' nested -- value 0


since the value is zero after the last parenthesis it never escapes form the read loop.


I've looked into fixing the problem myself but with no sucess. Has anyone figured out a fix to this problem?


Jim Malloy

Enterprise Application Services




-
This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. 

-


Re: [iText-questions] Chaper/Section headings and bookmark labels

2004-09-21 Thread Bruno Lowagie
Simon Brunning wrote:
I do have a question, though. I'm using chapters and sections to
organise my document, and it's working really well. But I'd like the
text of the chapter and section headers that appear in the dicument to
be different to the bookmark labels.
In what way different? How would you want to control the difference between
the title in the texts and the title in the bookmarks (= outlines). Is 
there an algorythm
to convert the actual title into the bookmark title or do you want to 
enter the
bookmark title while adding the Section/Chapter?

Is this possible?
Not for the moment. PdfDocument reads the title from the Chapter
and puts it on the PDF as well as in the outlinetree.
How might I go about it?
 

Maybe PageEvents are a solution.
Ease of use is probably the main reason why you are using Chapters/Sections,
but you could also use GenericTags and build your outlinetree/bookmarks
with PageEvents. It may sound more complicated, but it will give you a lot
of extra flexibility (and it isn't that hard to achieve). Maybe it would 
be good
to give an example so that the mailinglist subscriber can suggest a solution
that fits the problem.
br,
Bruno

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF Cropping

2004-09-21 Thread Andrea Baccin
You got the point.
I need to crop the page using the margin values, but it seems that iText 
can't do this.
Do you know any 3rd party sftw that do this?
Thank again

Paulo Soares wrote:
Let's see if I understand your requirement.
1 - you want to find out the margin size base on the page content
2 - you want to crop the page
iText can't do 1.
To do 2:
PdfReader reader = new PdfReader(...);
PdfDictionary page = reader.getPageN(1);
page.put(PdfName.CROPBOX, new PdfArray(new float[]{10, 20, 30, 40}));
//the visible page
PdfStamper stp = new PdfStamper(reader, ...);
stp.close();
Best Regards,
Paulo Soares
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On 
Behalf Of Andrea Baccin
Sent: Tuesday, September 21, 2004 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [iText-questions] PDF Cropping

Leonard Rosenthol wrote:
   

At 11:47 AM 9/20/2004, Andrea Baccin wrote:
 

I have the needing of modify existing pdf files: I need to 
   

delete all
   

white space in left and upper margin.
   

   Do you just need to visually remove that area from 
 

display, or 
   

actually change the physical PDF data to eliminate it?
   PDF supports a "crop box" which effects the visual display, 
but doesn't actually remove anything from the PDF.  That 
 

can easily be 
   

set with PdfStamper.   To do the latter would be a LOT of work and 
require you to understand the internals of PDF - OR use a 3rd party 
product that can do it for you.

 

I need only to visually remove that area from display and print. This
can be easy done with the following code (I use iText Net):
Dim Reader As New PdfReader("IN.pdf")
Dim n As Integer = Reader.getNumberOfPages()
Dim psize As Rectangle = Reader.getPageSize(1)
Dim Document As New Document(psize, 1, 0, 1, 0)
Dim Writer As PdfWriter = PdfWriter.getInstance(Document, New
FileOutputStream("OUT.pdf"))
Document.open()
Dim cb As PdfContentByte = Writer.getDirectContent()
Document.newPage()
Dim page1 As PdfImportedPage = 
Writer.getImportedPage(Reader, 1)
page1.moveTo(0, 0)
cb.addTemplate(page1, 1.0F, 0, 0, 1.0F, -15, 85)
Document.close()

With the "addTemplate" I just set the x and y coordinates where I want
to paste the imported page. The main problem is that Y value 
must change
in function of the INput PDF. I've tried to use "getCropBox" 
but always
return the PageSize.
I've looked at PDFStamper API in
http://itext.sourceforge.net/docs/com/lowagie/text/pdf/PdfStamper.html
but I cannt find anything useful.
I've attached IN.pdf and OUT.pdf in case you want take a look at it.
Thanks a lot
Andrea
   


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Chaper/Section headings and bookmark labels

2004-09-21 Thread Simon Brunning
I've recently started using iText, having finally managed to convince
the managment that StyleReport, the tool that we had been using for
some terrible reason, was effectivly unusable. I'm finding using iText
a real pleasure. It just *works*. Thanks to all those involved in its
creation!

I do have a question, though. I'm using chapters and sections to
organise my document, and it's working really well. But I'd like the
text of the chapter and section headers that appear in the dicument to
be different to the bookmark labels. Is this possible? How might I go
about it?

I'm using version 1.01 at the mo', but that's not set in stone.

-- 
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Problem with Header

2004-09-21 Thread Paulo Soares
Use PdfPtable. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Monday, September 20, 2004 9:43 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Problem with Header
> 
> 
> 
> 
> 
> 
> Hi
> I am trying to add 5 rows to header and i want to display all 
> the 5 rows in
> each and every page. Also the 5th row in header has multiple rows. The
> problem is the first page is coming up properly but later on 
> the extra line
> is adding up in each and every page which is overwriting the 
> text. Can any
> body help in this issue.
> 
> Thanks & Regards
> sudhir
> Thanks & Regards
> sudhir(x7358)
> 
> 
> 
> ---
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your 
> judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] HTMLWorker ...

2004-09-21 Thread Paulo Soares



If it compiles but doesn't run, you are using 2 different iText 
versions.
 
Best Regards,
paulo Soares

  
  
  From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Rémi 
  GuilbertSent: Monday, September 20, 2004 8:40 PMTo: 
  [EMAIL PROTECTED]Subject: [iText-questions] 
  HTMLWorker ...
  
  Hi, 
  when I use the HTMLWorker 
  object,
   
    Reader reader = 
  new 
  FileReader("C:\\Ora9ias\\jdev\\mywork\\PVQ\\PVQ\\public_html\\html\\RGUILBER.html");
   
    Document document 
  = new Document(PageSize.LEGAL);  OutputStream 
  output = new 
  FileOutputStream("C:\\Ora9ias\\jdev\\mywork\\PVQ\\PVQ\\public_html\\pdf\\RGUILBER.PDF");  
    PdfWriter writer = 
  PdfWriter.getInstance(document, output);  
  document.open();  
  document.resetPageCount();
   
    try 
    
  { new 
  HTMLWorker(document).parse(reader);  
  }  catch (Exception e) 
    
  { 
  e.printStackTrace();  
  }  document.close();
  
  I have these execution errors
   
  java.lang.NoSuchMethodError: void 
  com.lowagie.text.pdf.SimpleXMLParser.parse(com.lowagie.text.pdf.SimpleXMLDocHandler, 
  com.lowagie.text.pdf.SimpleXMLDocHandlerComment, java.io.Reader, 
  boolean)void 
  com.lowagie.text.html.simpleparser.HTMLWorker.parse(java.io.Reader) 
  HTMLWorker.java:86
  I use itext-paulo-138.jar version
  Thank's !!
  Rémi


RE: [iText-questions] PDF Cropping

2004-09-21 Thread Paulo Soares
Let's see if I understand your requirement.

1 - you want to find out the margin size base on the page content

2 - you want to crop the page

iText can't do 1.
To do 2:

PdfReader reader = new PdfReader(...);
PdfDictionary page = reader.getPageN(1);
page.put(PdfName.CROPBOX, new PdfArray(new float[]{10, 20, 30, 40}));
//the visible page
PdfStamper stp = new PdfStamper(reader, ...);
stp.close();

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Andrea Baccin
> Sent: Tuesday, September 21, 2004 9:47 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [iText-questions] PDF Cropping
> 
> Leonard Rosenthol wrote:
> 
> > At 11:47 AM 9/20/2004, Andrea Baccin wrote:
> >
> >> I have the needing of modify existing pdf files: I need to 
> delete all
> >> white space in left and upper margin.
> >
> >
> > Do you just need to visually remove that area from 
> display, or 
> > actually change the physical PDF data to eliminate it?
> >
> > PDF supports a "crop box" which effects the visual display, 
> > but doesn't actually remove anything from the PDF.  That 
> can easily be 
> > set with PdfStamper.   To do the latter would be a LOT of work and 
> > require you to understand the internals of PDF - OR use a 3rd party 
> > product that can do it for you.
> >
> I need only to visually remove that area from display and print. This
> can be easy done with the following code (I use iText Net):
> 
>  Dim Reader As New PdfReader("IN.pdf")
>  Dim n As Integer = Reader.getNumberOfPages()
>  Dim psize As Rectangle = Reader.getPageSize(1)
>  Dim Document As New Document(psize, 1, 0, 1, 0)
>  Dim Writer As PdfWriter = PdfWriter.getInstance(Document, New
> FileOutputStream("OUT.pdf"))
>  Document.open()
>  Dim cb As PdfContentByte = Writer.getDirectContent()
>  Document.newPage()
>  Dim page1 As PdfImportedPage = 
> Writer.getImportedPage(Reader, 1)
>  page1.moveTo(0, 0)
>  cb.addTemplate(page1, 1.0F, 0, 0, 1.0F, -15, 85)
>  Document.close()
> 
> With the "addTemplate" I just set the x and y coordinates where I want
> to paste the imported page. The main problem is that Y value 
> must change
> in function of the INput PDF. I've tried to use "getCropBox" 
> but always
> return the PageSize.
> I've looked at PDFStamper API in
> http://itext.sourceforge.net/docs/com/lowagie/text/pdf/PdfStamper.html
> but I cannt find anything useful.
> I've attached IN.pdf and OUT.pdf in case you want take a look at it.
> Thanks a lot
> Andrea
> 
> 
> 
> 
> 
> 
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Attaching an Image to a Rtf Document

2004-09-21 Thread eran bergman
Hello Bruno.
 
I am currently trying to attach a jpeg to my Document:
 
document.open();
com.lowagie.text.Image jpeg = com.lowagie.text.Image.getInstance(path); //works finejpeg.setAlignment(com.lowagie.text.Image.MIDDLE);document.add(jpeg); //takes a long time 
 
it seems to work fine cos I get a large rtf file (104K instead if 38K without the Image - (Image  size 33K)), I also get a message from MS Word telling me the "system does not have enough disk space or memory to complete the action" and I only get the rest of the text I added to the Document.
 
Thanks 
EranAdd photos to your e-mail with MSN 8. Get 2 months FREE*.


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] HTMLWorker ...

2004-09-21 Thread Rémi Guilbert



Hi, 
when I use the HTMLWorker object,
 
  Reader reader = new 
FileReader("C:\\Ora9ias\\jdev\\mywork\\PVQ\\PVQ\\public_html\\html\\RGUILBER.html");
 
  Document document = 
new Document(PageSize.LEGAL);  OutputStream 
output = new 
FileOutputStream("C:\\Ora9ias\\jdev\\mywork\\PVQ\\PVQ\\public_html\\pdf\\RGUILBER.PDF");  
  PdfWriter writer = 
PdfWriter.getInstance(document, output);  
document.open();  
document.resetPageCount();
 
  try 
  
{ new 
HTMLWorker(document).parse(reader);  
}  catch (Exception e) 
  
{ 
e.printStackTrace();  
}  document.close();

I have these execution errors
 
java.lang.NoSuchMethodError: void 
com.lowagie.text.pdf.SimpleXMLParser.parse(com.lowagie.text.pdf.SimpleXMLDocHandler, 
com.lowagie.text.pdf.SimpleXMLDocHandlerComment, java.io.Reader, 
boolean)	void 
com.lowagie.text.html.simpleparser.HTMLWorker.parse(java.io.Reader) 
HTMLWorker.java:86
I use itext-paulo-138.jar version
Thank's !!
Rémi


[iText-questions] Problem with Header

2004-09-21 Thread Versatech . Devabhaktuni





Hi
I am trying to add 5 rows to header and i want to display all the 5 rows in
each and every page. Also the 5th row in header has multiple rows. The
problem is the first page is coming up properly but later on the extra line
is adding up in each and every page which is overwriting the text. Can any
body help in this issue.

Thanks & Regards
sudhir
Thanks & Regards
sudhir(x7358)



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Vertical alignment in PdfPCells

2004-09-21 Thread Paulo Soares
That's not a problem, just an option. Let's analyze the options:

1 - leading space between the top padding and the baseline (as it's
now). Pros, all the chars will fit. Cons, space between the ascender and
the top padding for most of the chars.

2 - ascender space between the top padding and the baseline. Pros, looks
better for capitals. Cons, lower case will still have space and some
characters will be clipped.

3 - lower case height between the top padding and the baseline. Pros,
looks better for lower case. Cons, all the characters except lower case
will be clipped.

4 - space based on bbox of characters in the line. Pros, no character is
clipped and space is the minimum. Cons, bbox analysis on each char,
baseline may be different even with same font and size, iText doesn't
gather the bbox information.

Option 2 may be possible, I'll have to think about it.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Christian Lauer
> Sent: Tuesday, September 21, 2004 7:20 AM
> To: iText Mailing List
> Subject: [iText-questions] Vertical alignment in PdfPCells
> 
> Hi Paulo,
> 
> an UJAC user had a interesting question about vertical alignment in
> PdfPCells. The problem he discovered is that you can't really 
> perform a
> top or middle alignment, not even with fixed leading set to zero and
> multiplied leading set to 1.0. There will always be a little 
> extra space
> between the top of the cell and the contents.
> 
> And the workaround by manipulating the paddingTop attribute 
> is no ideal
> solution too because it depends on the font size that's used. 
> 
> Is there a real solution for that problem?
> 
> I've attached an test programm, which produces the problem.
> 
> Best regards,
> Christian
> 
> -- 
> Christian Lauer <[EMAIL PROTECTED]>
> 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF Cropping

2004-09-21 Thread Andrea Baccin
Leonard Rosenthol wrote:
At 11:47 AM 9/20/2004, Andrea Baccin wrote:
I have the needing of modify existing pdf files: I need to delete all
white space in left and upper margin.

Do you just need to visually remove that area from display, or 
actually change the physical PDF data to eliminate it?

PDF supports a "crop box" which effects the visual display, 
but doesn't actually remove anything from the PDF.  That can easily be 
set with PdfStamper.   To do the latter would be a LOT of work and 
require you to understand the internals of PDF - OR use a 3rd party 
product that can do it for you.

I need only to visually remove that area from display and print. This
can be easy done with the following code (I use iText Net):
Dim Reader As New PdfReader("IN.pdf")
Dim n As Integer = Reader.getNumberOfPages()
Dim psize As Rectangle = Reader.getPageSize(1)
Dim Document As New Document(psize, 1, 0, 1, 0)
Dim Writer As PdfWriter = PdfWriter.getInstance(Document, New
FileOutputStream("OUT.pdf"))
Document.open()
Dim cb As PdfContentByte = Writer.getDirectContent()
Document.newPage()
Dim page1 As PdfImportedPage = Writer.getImportedPage(Reader, 1)
page1.moveTo(0, 0)
cb.addTemplate(page1, 1.0F, 0, 0, 1.0F, -15, 85)
Document.close()
With the "addTemplate" I just set the x and y coordinates where I want
to paste the imported page. The main problem is that Y value must change
in function of the INput PDF. I've tried to use "getCropBox" but always
return the PageSize.
I've looked at PDFStamper API in
http://itext.sourceforge.net/docs/com/lowagie/text/pdf/PdfStamper.html
but I cannt find anything useful.
I've attached IN.pdf and OUT.pdf in case you want take a look at it.
Thanks a lot
Andrea





OUT.pdf
Description: Adobe PDF document


IN.pdf
Description: Adobe PDF document