Ahh, I see.  I can build the tables with each portion of data that belongs
to an attribute, add that to the document, reinitialize the tables for the
next portion of data and add to the document, etc.  This works, thank you.

Clair W. Cabal
Nelson & Associates
406-777-4140
406-531-2444 (cell)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, June 20, 2007 11:45 AM
To: [email protected]
Subject: iText-questions Digest, Vol 13, Issue 68

Send iText-questions mailing list submissions to
        [email protected]

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

You can reach the person managing the list at
        [EMAIL PROTECTED]

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


Today's Topics:

   1. Dynamic content in document header (Clair W. Cabal)
   2. Re: Dynamic content in document header (Paulo Soares)
   3. Re: JPEG Image Update for PdfGraphics2D (Paulo Soares)
   4. Re: Question about HTMLWorker ([EMAIL PROTECTED])
   5. Re: Question about HTMLWorker (Bruno Lowagie)
   6. Re: Question about HTMLWorker (Paulo Soares)


----------------------------------------------------------------------

Message: 1
Date: Wed, 20 Jun 2007 09:30:51 -0600
From: "Clair W. Cabal" <[EMAIL PROTECTED]>
Subject: [iText-questions] Dynamic content in document header
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

My task is this:  create a pdf report document of many pages where each page
has a header with both fixed content and dynamic content (the value changes
periodically throughout the report).  

 

I have been unable to accomplish this.  I have a class that builds the
report and a class that builds the header which extends PdfPageEventHelper.
The PdfPageEventHelper class has access to the attributes that periodically
change in the report class.  I initialize the variables that need to display
in the onStartPage method, and display the header information in the
onEndPage method.  Whatever the LAST variable values are for the report is
what gets printed in the header of every page.  So, it looks like the
PdfPageEventHelper methods do not execute until the entire document is
complete - by which time I have lost the ability to capture the values I
need.  Is there a way to do this?  

 

Clair W. Cabal

Nelson & Associates

 

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Wed, 20 Jun 2007 16:49:39 +0100
From: "Paulo Soares" <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Dynamic content in document header
To: "Post all your questions about iText here"
        <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="us-ascii"

onStartPage and onEndPage execute on each page, as expected. Check that
your attributes really change page by page. That won't happen if you
have a table and the attributes change when you add something to the
table. As the table only generate pages when added to the document,
there you have the last attribute mistery. I'm just guessing, of course.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Clair W. Cabal
> Sent: Wednesday, June 20, 2007 4:31 PM
> To: [email protected]
> Subject: [iText-questions] Dynamic content in document header
> 
> My task is this:  create a pdf report document of many pages 
> where each page has a header with both fixed content and 
> dynamic content (the value changes periodically throughout 
> the report).  
> 
>  
> 
> I have been unable to accomplish this.  I have a class that 
> builds the report and a class that builds the header which 
> extends PdfPageEventHelper.  The PdfPageEventHelper class has 
> access to the attributes that periodically change in the 
> report class.  I initialize the variables that need to 
> display in the onStartPage method, and display the header 
> information in the onEndPage method.  Whatever the LAST 
> variable values are for the report is what gets printed in 
> the header of every page.  So, it looks like the 
> PdfPageEventHelper methods do not execute until the entire 
> document is complete - by which time I have lost the ability 
> to capture the values I need.  Is there a way to do this?  
> 
>  
> 
> Clair W. Cabal
> 
> Nelson & Associates
> 
>  
> 
> 


Aviso Legal:
Esta mensagem i destinada exclusivamente ao destinatario. Pode conter
informagco confidencial ou legalmente protegida. A incorrecta transmissco
desta mensagem nco significa a perca de confidencialidade. Se esta mensagem
for recebida por engano, por favor envie-a de volta para o remetente e
apague-a do seu sistema de imediato. I proibido a qualquer pessoa que nco o
destinatario de usar, revelar ou distribuir qualquer parte desta mensagem. 

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




------------------------------

Message: 3
Date: Wed, 20 Jun 2007 17:01:57 +0100
From: "Paulo Soares" <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] JPEG Image Update for PdfGraphics2D
To: "Post all your questions about iText here"
        <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="us-ascii"

It's in the SVN, thank you.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Bill Ensley
> Sent: Wednesday, June 20, 2007 5:31 AM
> To: 'Post all your questions about iText here'
> Subject: [iText-questions] JPEG Image Update for PdfGraphics2D
> 
> Hello All 
> 
> Recently a request was made to update PdfGraphics2D using 
> Java's ImageIO
> library instead of relying on com.sun classes.
> 
> I have made the updates and included them below.
> 
> My apologies for the format of this patch, I am unaccustomed 
> to submitting
> code.
>  
> Below are the relevent changes:
> 
> Line #180
> 
>       super();
> 
>       /*
>       *  Below can be safely removed
>       */
> 
>       /*try {
>         Class.forName("com.sun.image.codec.jpeg.JPEGCodec");
>       }
>       catch (Throwable t) {
>         convertImagesToJPEG = false;
>       }*/
>  
> Line # 1257
>  
>       BufferedImage scaled = new BufferedImage(img.getWidth(null),
> img.getHeight(null), BufferedImage.TYPE_INT_RGB);
>       Graphics2D g3 = scaled.createGraphics();
>       g3.setColor(Color.WHITE);
>       g3.fillRect(0,0,img.getWidth(null), img.getHeight(null));
>       g3.drawImage(img, 0, 0, img.getWidth(null), img.getHeight(null),
> null);        
>       g3.dispose();   
>       img.flush();
>       img = null;
> 
>       ByteArrayOutputStream baos = new ByteArrayOutputStream();
> 
> 
>       /*
>       *  Below comments can be safely removed
>       */
> 
>       /*com.sun.image.codec.jpeg.JPEGImageEncoder encoder =
> com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(baos);
>       com.sun.image.codec.jpeg.JPEGEncodeParam param =
> com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(scaled);
>       param.setQuality(jpegQuality, true);
>       encoder.encode(scaled, param);*/
> 
>       /*
>       *  End removal
>       */
> 
>       ImageWriteParam iwparam = new
> JPEGImageWriteParam(Locale.getDefault());
>       iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
>       iwparam.setCompressionQuality(jpegQuality);//Set here your
> compression rate
>       ImageWriter iw = 
> ImageIO.getImageWritersByFormatName("jpg").next();
>       ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
>       iw.setOutput(ios);
>       iw.write(null, new IIOImage(scaled, null, null), iwparam);
>       iw.dispose();
>       ios.close();
> 
>       scaled.flush();
>       scaled = null;
>       image = com.lowagie.text.Image.getInstance(baos.toByteArray());
>       baos.flush();
>       baos.close();
> 
> 
> Sincerely, 
> 
> Bill Ensley
> Phone: 503.244.4738
> Fax: 503.244.5235
> 
>  <http://www.bearprinting.com> 


Aviso Legal:
Esta mensagem i destinada exclusivamente ao destinatario. Pode conter
informagco confidencial ou legalmente protegida. A incorrecta transmissco
desta mensagem nco significa a perca de confidencialidade. Se esta mensagem
for recebida por engano, por favor envie-a de volta para o remetente e
apague-a do seu sistema de imediato. I proibido a qualquer pessoa que nco o
destinatario de usar, revelar ou distribuir qualquer parte desta mensagem. 

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




------------------------------

Message: 4
Date: Wed, 20 Jun 2007 14:05:38 -0300
From: [EMAIL PROTECTED]
Subject: Re: [iText-questions] Question about HTMLWorker
To: Post all your questions about iText here
        <[email protected]>
Message-ID:
        
<[EMAIL PROTECTED]>
        
Content-Type: text/plain; charset="us-ascii"

I don't understand. 

I have to take a change inside the htmlworker and not at ListArray 
returned by it? 

I use this :  style.loadTagStyle("li","list-style-position","inside"); but 
is not work...and i try style.loadTagStyle("ul","compact","compact"); too 
but the symbol of the list are one line up of the text.

Thanks for any help!!

Daniela





"Paulo Soares" <[EMAIL PROTECTED]>
Enviado Por: [EMAIL PROTECTED]
19/06/2007 19:15
Favor responder a Post all your questions about iText here
 
        Para:   "Post all your questions about iText here" 
<[email protected]>
        cc: 
        Assunto:        Re: [iText-questions] Question about HTMLWorker


It's easier to process the html.

Paulo

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, June 19, 2007 9:44 PM
Subject: [iText-questions] Question about HTMLWorker


> HI.
>
> I have an html source like this:
>
> <ul>
> <li><p>bla bla bla</p></li>
> <li><p>bla bla bla</p></li>
> <li><p>bla bla bla</p></li>
> </ul>
>
> Because there are a <p>, the htmlworker, correctly, make a new line. But 
i
> need "delete" this new line.
>
> I try using:
>
> if (e instanceof List){
>                        .....
>                         }
>
> but i don't know how to "delete" the first new line inside the text.
>
> Any help is welcome!!!!
>
> Daniela 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Wed, 20 Jun 2007 19:25:30 +0200
From: Bruno Lowagie <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Question about HTMLWorker
To: Post all your questions about iText here
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

[EMAIL PROTECTED] wrote:
> 
> I don't understand.
> I have to take a change inside the htmlworker and not at ListArray 
> returned by it?

That's irrelevant.
I think that Paulo meant that you should process the HTML
BEFORE using HTMLWorker. Parse the HTML, filter out whatever
you don't like, then use the resulting, 'filtered' HTML to
feed HTMLWorker. That will probably save you a lot of trouble.
best regards,
Bruno



------------------------------

Message: 6
Date: Wed, 20 Jun 2007 18:45:07 +0100
From: "Paulo Soares" <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Question about HTMLWorker
To: "Post all your questions about iText here"
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=original

A simple regexp should be enough.

Paulo

----- Original Message ----- 
From: "Bruno Lowagie" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Wednesday, June 20, 2007 6:25 PM
Subject: Re: [iText-questions] Question about HTMLWorker


> [EMAIL PROTECTED] wrote:
>>
>> I don't understand.
>> I have to take a change inside the htmlworker and not at ListArray
>> returned by it?
>
> That's irrelevant.
> I think that Paulo meant that you should process the HTML
> BEFORE using HTMLWorker. Parse the HTML, filter out whatever
> you don't like, then use the resulting, 'filtered' HTML to
> feed HTMLWorker. That will probably save you a lot of trouble.
> best regards,
> Bruno




------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


End of iText-questions Digest, Vol 13, Issue 68
***********************************************



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to