HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › Text running off the page and same email content repeating
- This topic has 6 replies, 2 voices, and was last updated May 07, 2013
14:32:05 by PD4ML.
-
AuthorPosts
-
April 19, 2013 at 11:48#26838
The text in the email is running off the page.Also the converted PDF has email content repeating.Sample file attached.Please help to resolve the issue.
April 19, 2013 at 19:32#29316In order to make the text fit the horizontal space try to increase pd4ml.setHtmlWidth() parameter.
See http://pd4ml.com/cookbook/pdf_page_formatting.htm for more details.
The content is repeating, because the MIME message includes two email versions: text only and HTML.
April 22, 2013 at 09:49#293171. If I increase the pd4ml.setHtmlWidth() parameter , this problem will be cured only for this file or for all the DXL files?
2. I don’t want two email versions.Is it not possible to suppress the HTML version?Why only for specific files has this porblem?
April 22, 2013 at 13:27#293181. htmlWidth is a conversion parameter. If you change it for particular conversion call – it impacts the only conversion result. If you change it for all conversions (permanently in your agent code, for example) – it will impact all conversions.
In principle, you may measure the document right side edge with a fake conversion call (http://pd4ml.com/cookbook/pd4ml_conversion_status.htm ) and if it exceeds the default htmlWidth – increase its value.
Another approach would be to limit generated HTML width in XSL. Currently it is set to stretchable value “100%”. Set it absolute in “px”, more-less matching your htmlWidth parameter value.
[language=xml:xyqcxmxg]…
Page $[page] of $[total] …[/language:xyqcxmxg]
If the document has, for example, an image, which is wider than the table width/htmlWidth – the trick do not help.
2. DXL format (especially its embedded objects, like bitmaps, attachments, mime-messages) is not well-documented. We workaround problems, learning them by example, but unfortunately we cannot be sure we covered all the species of DXL’s MIME format. In the particular case you faced with something, that does not match the patterns we worked on.
April 23, 2013 at 11:32#29319Thanks.For the issue 1 I will try the solution you suggested and get back to you.For issue 2 is there no way to fix this type of issues?
May 6, 2013 at 08:54#29320Thanks.Yes the solution provided by you really helped to overcome the pagewidth issue but the font size of the PDF content decreased.Is there any way to increase it?
May 7, 2013 at 14:32#29321If some content does not fit a page width, you’ve got two options: either to extend htmlWidth (in the case the content is scaled down) or to narrow the content, using HTML means.
If the downscaling of the content is not acceptable, just enclose the content into a table and set the table width more-less matching htmlWidth parameter.
In DXL scenario the enclosing table is already there – just find it in XSL and change width=”100%” to width=”800″, for example.
-
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.