Menu

setMargins() for XmlParser?

2005-05-11
2013-05-01
  • Jason Perkins

    Jason Perkins - 2005-05-11

    First, thanks for this great library. I was up and running in an afternoon, generating complex documents from XML. Great work!

    My issue: I am generating a PDF document from XML using
    XmlParser.parse(). Works great, but it ignores the margin sizes that I set in the Document constructor.

      Document doc = new Document(PageSize.A4, 88.0f, 88.0f, 88.0f, 88.0f);

    I always get the default margins anyway. I thought that perhaps I needed to specify the margins in the XML but I don't see any way to do that in the iText DTD. I am downloading the source code now and maybe I'll be able to figure it out myself, but any help would be appreciated.

    Thanks!

     
    • Jason Perkins

      Jason Perkins - 2005-05-11

      I found it in the source...use the attributes "left", "right", etc. on the <itext> element. Great!

       
    • Gianluigi

      Gianluigi - 2006-01-22

      Hi,

      I have the same problem on parse from HTML,
      I don't understand well where you put the margin value

      may you post an exemple?

      Thanks

       
      • Kazuya Ujihara

        Kazuya Ujihara - 2006-02-23

        See <http://www.ujihara.jp/iTextdotNET/codes/inputs/XmlPageSetting.xml> and <http://www.ujihara.jp/iTextdotNET/codes/jp/ujihara/itext/test/xml/XmlPageSetting.java>.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.