Menu

#7 Adding a HTML page does not handle margins

closed-fixed
nobody
None
5
2006-03-12
2006-03-08
Anonymous
No

If a document is created with margins and a HTML
pages is added to the document, then the page margins
are ignored and the HTML is written on the page from
the top to the bottom.

Document document = new Document(PageSize.A4,
0,0,100,100);
PdfWriter.getInstance(document, new FileStream
(tempPdfFile, FileMode.Create));
document.open();
com.lowagie.text.html.HtmlParser.parse(document,
tempHtmlFile);
document.close();

I want to print on a document that will have the
company header/watermark over it. The header is quite
large. When the HTML is written to the document it
overwrites the header.

dave@tcpiq.com

Discussion

  • Kazuya Ujihara

    Kazuya Ujihara - 2006-03-12

    Logged In: YES
    user_id=734754

    Thank you for your bug report.
    The bug was fixed in 1.4-1 version. And you need to
    specify margins in BODY tag of input HTML file.
    See an attached example program to know how to do it.

     
  • Kazuya Ujihara

    Kazuya Ujihara - 2006-03-12
    • status: open --> open-fixed
     
  • Kazuya Ujihara

    Kazuya Ujihara - 2006-03-12

    Sample program

     
  • Kazuya Ujihara

    Kazuya Ujihara - 2006-03-12
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.