HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › pd4ml:transform does not seem to work
- This topic has 5 replies, 2 voices, and was last updated Feb 16, 2012
10:10:26 byPD4ML.
-
AuthorPosts
-
February 14, 2012 at 13:04#26682
We have included the pd4ml lib in an application and externalized the template of the document itself. Now we have created below document, but it appears that the transform tag does not work; all other tags do work. The main goal we are trying to achieve is to get the page HTML body to fit the PDF exactly because of some images (cut out in example code).
Can anyone help us and get this fixed?
<br /> <pd4ml:transform<br /> pageFormat="A4"<br /> screenWidth="710"<br /> pageOrientation="portrait"<br /> pageInsets="0,0,0,0,points"><br /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"<br /> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><br /> <html xmlns="http://www.w3.org/1999/xhtml"><br /> <head><br /> </head><br /> <body style="width: 710x"><br /> <pd4ml:page.header height="140"><br /> <div id="header" /><br /> </pd4ml:page.header><br /> <pd4ml:page.footer height="50"><br /> <div id="footer" /><br /> </pd4ml:page.footer><br /> Content goes here.<br /> </body><br /> </html><br /> </pd4ml:transform><br />February 14, 2012 at 17:08#28878<pd4ml:transform>is a custom JSP tag, which works only with JSP.The tag is a wrapper for PD4ML API, so all its attributes have equivalents in PD4ML class methods.
February 15, 2012 at 09:04#28879If transform is a JSP tag, what kind of tag is the pd4ml:page.footer tag then? That one does work in the given example.
Which tags should I use to set the page width and inset?
February 15, 2012 at 12:40#28880There is no dedicated tag for that. It can be configured with PD4ML API: pd4ml.setHtmlWidth(), pd4ml.setPageSize() and pd4ml.setPageInsets()
there is also a possibility to change the parameters on-a-fly with
<pd4ml:page.break>: https://pd4ml.com/cookbook/pdf_dynamic_format_change.htmFebruary 16, 2012 at 09:01#28881Using break would add a new page, correct? The pdf we try to build is just one page, using break would result in two pages. Can we do this otherwise?
February 16, 2012 at 10:10#28882No, there is no tag to define initial conversion parameters.
As long as you do not use the JSP taglib, I guess you instantiate PD4ML object and call render() method. Why don’t you define needed parameters via the API before the render() call?
-
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.
