Forum Replies Created
-
AuthorPosts
-
in reply to: pd4ml in a .jspx file used with success – up to a point …. January 24, 2012 at 14:09#28756
OK, now try to substitute all occurrences of “pd4ml:” with “pd4mlXXX”, try to open the page in a web browser and open the generated HTML document source.
Are there any whitespaces before
<pd4mlXXXtransform>?in reply to: display current date every time the PDF is opened January 24, 2012 at 11:51in reply to: display current date every time the PDF is opened January 24, 2012 at 11:50#28787Currently the feature is not supported.
We’ll investigate today if PD4ML architecture would allow to embed JavaScript to generated PDFs in principle.
in reply to: pd4ml in a .jspx file used with success – up to a point …. January 24, 2012 at 11:44#28754Could you please publish a sample of your .jspx page?
in reply to: RTF Font Formatting January 23, 2012 at 20:23#28783We’ve just fixed the text background issue, always worked in our environment.
The updated version is going to be released in few days.in reply to: RTF features January 23, 2012 at 20:20#28769In few days we plan to release a new PD4ML version which addresses the issues. Below are our comments:
> I am not able to control the height of header/footer.
Unfortunately RTF format does not allow to control header/footer height. I would recommend to define header/footer as a table, with an explicitly given height matches the desired header/footer height.> Also I am not able to use multiple headers/footers – it seems that the last used will be on all pages regardless.
> Looking at the RFT spec, the format seems rather limited, but I see that it is possible to have a different
> footer/header on the first page (headerf) which I would assume is the most common need.
You are right, it is possible to define a different page header/footer for a title page only. In the new version you may define such header/footer that way:
PD4PageMark header = new PD4PageMark() { @Override public String getHtmlTemplate(int pageNumber) { if ( pageNumber == 1 ) { return "<b>Title page. $[title]</b>"; } return super.getHtmlTemplate(); } }; header.setHtmlTemplate("Page $[page]"); pd4ml.setPageHeader(header);
Unfortunately there is still no way to define title page header/footer with<pd4ml:page.header>tag.> I am not able to control any margins. Looking at the generated RTF, page margins are printed out,
> but is it a way to control this in the template, e.g. through the body?Now you may define margins via API call
pd4ml.setPageInsets(new Insets(20,40,20,20));
via margin CSS property of<body>element or combined. CSS way does not impact page header/footer positioning, the API call does.> Unwanted line breaks
We suppressed the line breaks were it was possible.
Note: RTF tables do not allow to define top and bottom margins. If HTML source defines the margins, PDF output blank lines instead of them.in reply to: Paragraph indentation not working in generated RTF January 23, 2012 at 19:56#28763The feature is going to be supported with the next PD4ML release expected in few days.
in reply to: Lotus note PDF conversion problem January 18, 2012 at 13:25#28785Could you please publish a DXL sample you try to convert? Hopefully there is no sensitive info in it.
in reply to: PDF creation is slower than expected January 9, 2012 at 12:23#28784As PD4ML does not implement its own TCP/IP layer and relies on the very standard Java networking, I would suspect an issue with network configuration / DNS resolution on your side.
in reply to: problem changing orientation with tomcat January 9, 2012 at 12:06#28781I guess you mean table too wide for a single page.
Unfortunately PD4ML offers no way to split a table to columns, that fit a single page width.
Usual solution is to increase htmlWidth conversion parameter. But in the case it scales down the content and at particular values the content is not readable anymore in printed form.
The best approach would be re-think the table layout itself to make it print-friendly: probably to combine some columns etc
in reply to: problem changing orientation with tomcat January 5, 2012 at 16:20#28779> Here is a the pdf
I would call it PNGin reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width January 4, 2012 at 13:29#28752> it causes current issue in certain pdf report -3/4 of page shows blank
It should happen only in situations, when the source HTML has elements with width=”100%”, which leave no “blank space” to be cut with adjustHtmlWidth()
in reply to: problem changing orientation with tomcat January 4, 2012 at 13:11#28777Could you please publish a sample of a dummy PDF with “landscape” directive, generated in your environment.
in reply to: Display Currency symbols in pdf December 28, 2011 at 13:39#28768It should be no problem to display currency symbols if they are part of Latin-1 charset. If not, you have to unilize TTF embedding feature of PD4ML Pro.
See: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html
in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width December 22, 2011 at 13:11#28750Now I see what was the problem reason: I paid no heed to converter.adjustHtmlWidth() call.
It is better to remove both: converter.adjustHtmlWidth() and convert.fitPageVertically() until you have no special need in the features.
convert.fitPageVertically() tries to place all content to a single page. It does not reflow it, but just scales down content until it fit. If needed scale factors make text extremely tiny, it gives up. Obviously it happens with the document with your current configuration.
converter.adjustHtmlWidth() first renders page with given converter.setHtmlWidth() (virtual web browser frame width), after that calculates right content edge, sets htmlWidth parameter to the new value and re-renders the page. But if the page has an element with width=100% the approach does not work as the right content edge will be always equal to the initial converter.setHtmlWidth() value.
BTW: the code
if(landscapeView) converter.setHtmlWidth(1000); else converter.setHtmlWidth(PD4Constants.LETTER.width);
is not correct. As converter.setHtmlWidth() expects a parameter given in screen pixels, but PD4Constants.LETTER.width is a paper format in typographical points. Well, they are both integer values – hopefully you know what you do.
-
AuthorPosts
