Hi all,
        Since this is my first post here, I'd like to congratulate Bruno
and Paulo
        for the excellent job on iText. Really, I like it very much!
This is not
        my first exposure to PDF programming - I am an author of
"fun-pdf", the
        functional  interface to C library pdflib  from three functional
languages 
        (Q, Ocaml, Haskell). It follows that my congratulations come
with some
        weight attached :-). (see P.S.)

        I use iText for generating PDF documents which combine some
authored
        text and some documentation extracted from a java source code.
There are 
        at least two xml inputs to my program: one is handled by your
SAX parser
        (with a help of appropriate tagmap.xml)  and another by the rest
of my program,
        which combines regex parsing, XPP xml parsing, and interfacing
to iText.
        Two different xml parsers aside (I really prefer pull parsers
over SAX), I need to
        keep the document open after the SAX parser finishes its job to
continue
        with the second input source. Unfortunately the "parse" method
closes
        the document.
        My workaround is this: I copied your SAXiTextHandler and
SAXmyHandler
        to a separate package and modified them appropriately to assure
that 
        the document is not closed when the parser finishes its job. I
leave it
        to the main program to close the document at the end of both of
its tasks.
        I am not attaching the source files here, since I am not sure
whether
        the attachements are permitted on this list. But if anyone
(Bruno or Paulo perhaps?)
        cares I can send them the copy. But the idea is like this:
        
------------------------------------------------------------------------
------------------------------------------
        package com.naturaldata.util.doc;
        ....
        public class SAXiTextHandler extends DefaultHandler {
        ...
                // Few changes here
        }
        
------------------------------------------------------------------------
-------------------------------------------
        package com.naturaldata.util.doc;
        ....
        public class SAXmyHandler extends
com.naturaldata.util.doc.SAXiTextHandler {
                // nothing else changed here
        }
        
------------------------------------------------------------------------
-----------------------------------------------
        Shouldn't you provide similar solution in your original
SAXmyHandler?
        As some option perhaps? This way the patches like mine would not
have
        to be needed. I've seen some questions related to this problem
in the iText archives,
        so it looks like I am not the only one interested in handling
multiple xml inputs 
        to a single PDF document.
        
        Best regards,
        Jan

        P.S.
        If you are interested in fun->pdf, you can find the copy of the
program in the 
        WaybackMachine (www.archive.org). Just search for my name (Jan
Skibinski)
        or Numeric Quest (www.numeric-quest.com) - my site, which has
been
        unfortunately down for about a year now. But I promise it will
be back again! :-)




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to