Could you please check your HtmlWriter.java with the version in the cvs?

You have:

            switch(element.type()) {
                case Element.HEADER:
                    try {
                        Header h = (Header) element;
                        if (MarkupTags.STYLESHEET.equals(h.name())) {
                            writeLink(h);
                        }
                        else if (HtmlTags.JAVASCRIPT.equals(h.name())) {
                            writeJavaScript(h);
                        }
                        else {
                            writeHeader(h);
                        }
                    }

And in the cvs:

                case Element.HEADER:
                    try {
                        Header h = (Header) element;
                        if (!MarkupTags.STYLESHEET.equals(h.name())) {
                            writeHeader(h);
                        }
                        else {
                            writeLink(h);
                        }
                    }

writeLink() and writeHeader() are reversed. It works with your version but I
dont't know if it will break something else. Maybe Bruno has some idea.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Eyrich, Joachim [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 19:02
> To:   'Paulo Soares'
> Subject:      RE: JavaScript Improvement
> 
> Hello,
> 
> It seems you did not take the new HtmlWriter I sent you or the HtmlTags
> are
> old and don't include the variable "JAVASCRIPT".
> 
> Please find attached what the HTML output should like.
> 
> If you still have problems, please don't hesitate to contact me.
> 
> Good luck,
> Joachim
> 
> 
> 
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED]]
> Sent: 20 September 2002 17:16
> To: Eyrich, Joachim
> Subject: RE: JavaScript Improvement
> 
> 
> I tried your program but the resulting html didn't work in IE 5.5. Could
> you
> check if what I generated is correct?
> 
> Best Regards,
> Paulo Soares
> 
>  <<Test_JavaScript.zip>> 
> 
> > -----Original Message-----
> > From:       Eyrich, Joachim [SMTP:[EMAIL PROTECTED]]
> > Sent:       Friday, September 20, 2002 15:25
> > To: 'Paulo Soares'
> > Subject:    RE: JavaScript Improvement
> > 
> > Hello Paulo,
> > 
> > Sorry for the delay but a lot of work wanted to be done.
> > 
> > I added another feature, assigning a HTML style class to the <BODY> tag.
> > Therefore I added the variable "htmlStyleClass" to document.java,
> > including
> > getter and setter. Furthermore I added 2 lines in HtmlWriter.java, where
> > the
> > <BODY> tag is written.
> > 
> > Then I changed another two lines (422, 423) in HtmlWriter.java,
> regarding
> > the JavaScript import. This solves problems with old Netscape
> Navigators,
> > they insist on "<script ...></script>" instead of "<script ... />".
> > 
> > You find all files that I changed in the attached ZIP file. I included
> > also
> > a short example for the JavaScript function (Test_JavaScript.java).
> > 
> > I hope that was not too confusing and you'll find the time to implement
> > the
> > changes. If you prefer other names/locations/programmings, please feel
> > free
> > to change whatever you want. I can update my code accordingly.
> > 
> > By the way, I couldn't find out the difference between HtmlTags.java and
> > MarkupTags.java. Both contain general and HTML-specific tags.
> > 
> > Best Regards,
> > Joachim
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Paulo Soares [mailto:[EMAIL PROTECTED]]
> > Sent: 11 September 2002 13:29
> > To: Eyrich, Joachim; '[EMAIL PROTECTED]'
> > Subject: RE: JavaScript Improvement
> > 
> > 
> > I'll try to put it in the next release. Can you provide a small working
> > example?
> > 
> > Best Regards,
> > Palo Soares
> > 
> > > -----Original Message-----
> > > From:     Eyrich, Joachim [SMTP:[EMAIL PROTECTED]]
> > > Sent:     Tuesday, September 10, 2002 17:05
> > > To:       '[EMAIL PROTECTED]'
> > > Subject:  JavaScript Improvement
> > > 
> > > Hello Bruno,
> > > Hello Paulo,
> > > 
> > > In my project I need HTML sites with some JavaScript in the header.
> I've
> > > seen that iText currently does not support that.
> > > 
> > > Please find attached some iText files that I adapted to enable
> > JavaScript,
> > > as well as a MS-Word document that shows all changes and includes a
> > short
> > > example.
> > > 
> > > I tried my best to integrate the new features into the iText
> > architecture,
> > > but maybe it could be done better.
> > > 
> > > I hope you find the time to look at it and maybe add it to the iText
> > > SourceForge project.
> > > 
> > > Kind Regards,
> > > Joachim
> > > 
> > >  <<iText_JavaScript.zip>>  <<iText_Anpassungen_JavaScript.doc>> 
> > >  << File: iText_JavaScript.zip >>  << File:
> > > iText_Anpassungen_JavaScript.doc >> 
> >  << File: iText_JavaScript.zip >> 
>  << File: iText_JavaScript_Output.zip >> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to