Forum Replies Created
-
AuthorPosts
-
in reply to: PDF page headers/footers definition options February 1, 2013 at 17:19#27281
I’m using the PRO version.
in reply to: PDF page headers/footers definition options February 1, 2013 at 17:25#27282I’m trying to do somthing similar this:
PD4PageMark header= new PD4PageMark();
header.setHtmlTemplate(“<font color="red">page $[page] of $[total]</font>”);
header.setAreaHeight(-1);
pd4ml.setPageHeader(header);PD4PageMark footer = new PD4PageMark();
footer.setHtmlTemplate(“<font color="red">page $[page] of $[total]</font>”);
footer.setAreaHeight(-1);
pd4ml.setPageFooter(footer);But the pd4ml doesn’t render the footer.
in reply to: PDF page headers/footers definition options February 4, 2013 at 11:25#27283Nobody can help me?
in reply to: PDF page headers/footers definition options February 7, 2013 at 13:02in reply to: PDF page headers/footers definition options February 7, 2013 at 13:04#27285Try to temporarily set the height parameter to any defined value:
footer.setAreaHeight(50);
Does it change anything?in reply to: PDF page headers/footers definition options February 8, 2013 at 19:13#27286I need to use scope in headers’/footers’ settings thought java API.
After read PD4ML API reference and some samples, I noticed that there isn’t a method to set the scope attribute.
Is it possivel?in reply to: PDF page headers/footers definition options February 8, 2013 at 19:24#27287I need to use scope in headers’ and footers’ settings by java API.
After read PD4ML API reference and some samples, I noticed that there isn’t a method to set the scope attribute.
Is it possivel?in reply to: HTML/CSS rendering issues February 11, 2013 at 15:23#26812I have an html page to which I have added a background image which streches to the outermost div. But for some reason I cannot get the background image to appear in the pdf. The divs that we have used in the page have the height and widths in percentages. Following is the sample div structure from the page
HTML:
<div style="width: 714px; height: 924px; " > <div style="border-radius: 4px 4px 4px 4px; " > <img style="background: none repeat scroll 0% 0% rgb(255, 255, 255);" src="http://foobar.com/10.jpg" alt="" class="background" /> <div style="width: 100%; height: 100%; position: absolute;" id="fgen-6"> <div style="width: 94.78%; height: 94.56%; margin: 3.3% 2.61%;"> </div> </div> </div>
CSS for the IMG tag:
.background { width: 100%; height: 100%; position: absolute; left: 0; top: 0; z-index: 0; background-color: #fff; }in reply to: Troubleshooting February 13, 2013 at 07:01#26813Hi,
In some of DXL files converted to PDF files the headers (SUBJECT,FROM,SEND TO ,COPY TO) Fileds are missing.
I have attached the example file in which Fw_ Other languages document(Manikandan Kasirajan).DXL(Attached as a txt) file has Subject ,FROM,SEND TO fields are available at the top of the converted PDF.But in file Can Mr. Kleinhans act on the POA.DXL(Attached as a txt) the converted PDF has this headers missing.
Kindly help to resolve the issue.Thank you.
in reply to: Troubleshooting February 13, 2013 at 07:36#26814Hi ,
I am getting an out of memory erro while converting a dxl file to PDF File.
Kindly help to resolve the issue.DXL file attached as txt file.Note:sometimes the DXL file converted to PDF but in the resulting PDF File I have the below text see the attachement.This is a multipart message in MIME format
ContentElement(pd4content) [Dear Mr. Sharma and Mr. Singh,] {line-height=1.2000000476837158, white-space=pre, font-family=[Ljava.lang.String;@7f017f01, display=block, font-size=13}
ContentElement(pd4content) [Thank you for your email below, this is great news! Please proceed to ] {line-height=scale (1.2000000476837158), white-space=pre, font-family=[Ljava.lang.String;@7f017f01, display=block, font-size=13}[2/13/13 12:42:54:114 IST] 0000001b SystemErr R java.lang.OutOfMemoryError
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at java.util.ArrayList.newElementArray(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at java.util.ArrayList.growAtEnd(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at java.util.ArrayList.add(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.bb.super(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.bb.super(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.view.d.o00000(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.bb.super(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.view.d.o00000(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.bb.super(Unknown Source)
[2/13/13 12:42:54:114 IST] 0000001b SystemErr R at org.zefer.html.doc.d.super(Unknown Source)in reply to: Headers missing in the first part of email content February 15, 2013 at 14:01#29210dxl4pd4ml.xsl stylesheet builds mail headers with the following code:
<tr> <td valign="top">:</td><td></td> </tr>
however in your DXL sample the structure differs: expected tags are nested to :
<text >"Fil...nov, ...der" <...der.Fil...nov@BAKERNET.com> <mg...n@mmm.com> RE: Meguiar's/ANR - T39863
A quick solution is to add a new XSL iteration:
<tr> <td valign="top">:</td><td></td> </tr>
in reply to: Out of memory error while converting a dxl file February 15, 2013 at 14:34#29211In most of the cases “This is a multipart message in MIME format” means the email message includes 2 content versions: HTML and text-only.
I tested your DXL with PD4ML v381 – the build suppresses “This is a multipart message in MIME format”, however still outputs both content versions as PDF.
OutOfMemory error usually can be handled with an overriding of Max Heap Size JVM parameter (i.e. -Xmx512m). But first I would recommend to give a try to PD4ML v381 – since v380fx5 you currently use – we addressed a number of DXL converting issues.
in reply to: Background image to the html page not visible in the pdf February 15, 2013 at 15:43#29209I am not sure if I understand your approach with stretched background image right.
Try to apply a PD4ML-specific style “background-repeat: scale-xy” to a DIV – it should do the trick.
in reply to: PDF page headers/footers definition options February 15, 2013 at 15:49#27288There is a number of header-definition methods:
https://pd4ml.com/cookbook/pdf_header_footer_generation.htmWith Java API you may either merge header definition like
<pd4ml:page.header scope="2+">with HTML content (the header definition needs to be before opening<html>tag) or to customize PD4PageMark instance;PD4PageMark header = new PD4PageMark() { public String getHtmlTemplate(int pageNumber) { if ( pageNumber > 1 ) { return "<html><body>some document header stuff..."; } else { return ""; } } }; pd4ml.setPageHeader(header);in reply to: Troubleshooting February 16, 2013 at 16:47#26815I’ve seen this question a couple of times when searching the forum, but no answers.
I am brand new to PD4ML. I downloaded the probe yesterday and played with it quite a bit. It was generating the output as expected. So I downloaded the trial version (Java) and embedded it in my code. I do get a PDF document created. It appears to have the correct number of pages. But all of the pages are blank. Figuring it might be something in the HTML (even though the probe had no problem with the identical HTML), I reduced the html down to basically an H1 Helllo World. It produced 1 page as expected. But it was blank as well. Just to see if I was really controlling the converter, i changed the page size from LETTER to A4, and the next PDF correctly reflected the new page size.
Since this a completely new integration of this product into my system, I’m sure I’m doing something wrong. But I can’t see it. I’ve got about 5 lines of Java code, and the only real difference between what I installed and the probe might be jar file version. I am running this inside a webapp in Tomcat 7.0. But I wouldn’t think that would make a difference. (I downloaded the current trial version yesterday, if you need the version number).
My code is below, which includes the hardcoded test HTML. I’ve got the debug thing enabled. But it doesn’t appear to be generating anything (or I’m not looking in the right place). If there is any other info I can generrate/analyze, please let me know.
I’m ready to purchase a license. But I’ve got to make sure it will work in my environment first.
Thanks.
Jerry
public String getPDF()<br /> {<br /> StringReader html = new StringReader( "<html><body><h1>Hello</h1></body></html>" );<br /> ByteArrayOutputStream pdf = new ByteArrayOutputStream();<br /> PD4ML pd4ml = new PD4ML();<br /> try<br /> {<br /> pd4ml.useTTF("java:fonts", true);<br /> pd4ml.setPageSize( PD4Constants.A4);<br /> pd4ml.enableDebugInfo();<br /> pd4ml.render( html, pdf );<br /> }<br /> catch( Exception e)<br /> {<br /> e.printStackTrace( System.out );<br /> }<br /> return( pdf.toString() );<br /> } -
AuthorPosts
