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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
See <http://www.ujihara.jp/iTextdotNET/codes/inputs/XmlPageSetting.xml> and <http://www.ujihara.jp/iTextdotNET/codes/jp/ujihara/itext/test/xml/XmlPageSetting.java>.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
I found it in the source...use the attributes "left", "right", etc. on the <itext> element. Great!
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
See <http://www.ujihara.jp/iTextdotNET/codes/inputs/XmlPageSetting.xml> and <http://www.ujihara.jp/iTextdotNET/codes/jp/ujihara/itext/test/xml/XmlPageSetting.java>.