PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues Question about header areaHeight

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26726

    Dear supporter,
    I have a question about header height issue.
    Here is my code
    <br /> PD4PageMark header = new PD4PageMark();<br /> <br /> // date time..<br /> Date today = new Date();<br /> SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");<br /> <br /> header.setAreaHeight(15);<br /> //header.setPagesToSkip(2);<br /> header.setTitleTemplate(" "+formatter.format(today)+" ");<br /> header.setTitleAlignment(PD4PageMark.RIGHT_ALIGN);<br /> header.setFontSize(10);<br /> <br /> ImageIcon logo = new ImageIcon(_logoPath);<br /> int logo_width = logo.getIconWidth();<br /> int logo_height = logo.getIconHeight();<br /> <br /> header.setWatermark("file:"+_logoPath,new Rectangle(10,15,logo_width,logo_height), 100);<br /> <br /> _pdf.setPageHeader(header);<br /> <br /> PD4PageMark footer = new PD4PageMark();<br /> footer.setAreaHeight(20);<br /> footer.setPageNumberTemplate("$[page] / $[total]");<br /> footer.setPageNumberAlignment(PD4PageMark.CENTER_ALIGN);<br /> footer.setInitialPageNumber(1);<br /> footer.setPagesToSkip(0);<br /> footer.setFontSize(10);<br /> <br /> ImageIcon watermark = new ImageIcon(_watermarkPath);<br /> int watermark_width = watermark.getIconWidth();<br /> int watermark_height = watermark.getIconHeight();<br /> <br /> footer.setWatermark("file:"+_watermarkPath,new Rectangle(_width/2-(watermark_width/2),_height/2-(watermark_height/2),watermark_width,watermark_height), 30);<br /> <br /> _pdf.setPageFooter(footer);<br />

    My question is when i set header height first page and other pages have different height. This is same situation in PD4ML html_header example.

    Any way to have same header height overall pages?

    Kind regards,
    Gabriel

    #29001

    Most probably the first page header height difference effect is caused by the top margin. Try to define:

    BODY { margin-top: 0; margin-bottom: 0 }

    #29002

    It works.
    Thanks for quick replay.

    Kind regards,
    Gabriel

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.