Forum Replies Created
-
AuthorPosts
-
in reply to: java.lang.NullPointerException – Not picking up CSS file October 12, 2010 at 12:21#28237
Here you are faced with restrictions of PD4ML.
1. PD4ML offers only a lightweight support of
<legend>. It understands only text in it and ignores nested tag structures if any. You may apply text style and color to the legend text (addressing<legend>tag), but background colors and borders are going to be ignored.2. PD4ML allows to apply styles to . But
<form>tags are not a part of internal document structure tree, so they are not visible to CSS selector runtime. As a workaround you would need to remove .form from the CSS selectors..main_body .form P, .main_body .form DIV.customControl { font-weight : bold; color: #004677; line-height: normal; margin: 0px !IMPORTANT; padding: 1px 3px 1px 3px !IMPORTANT; vertical-align: top; }in reply to: installation / getting started October 12, 2010 at 10:38#28250pd4ml.pro.trial.361b1.zip is a good choice.
You need pd4ml_demo.jar and ss_css2.jar from it.in reply to: installation / getting started October 12, 2010 at 10:14#28248Obviously it must be a space between Java class name and the document path:
Dxl2Pdf E:Websites_tmpbpl1454/html
instead of
Dxl2PdfE:Websites_tmpbpl1454/html(as I just noticed – you resolved the problem)
Well, Dxl2Pdf is a Java class, designated to convert Lotus Notes documents in XML form (DXL) to PDF. Is it your intention? “html” at the end of the command line makes me suspect it is not.
If you need to convert HTML to PDF, take a look to the info:
https://pd4ml.com/html-to-pdf-command-line-tool.htm#28230The feature available since v351b7
In your code sample you would also need to add “height” attibute.
in reply to: java.lang.NullPointerException – Not picking up CSS file October 7, 2010 at 13:04#28232Obviously PD4ML successfully read the stylesheet, but CSS parser failed to interpret it. Could you please publish the stylesheet here or send it to support pd4ml com?
#28228The needed functionality may be achieved (to some extend) with a proprietary tag, we implemented by a customer request.
See: pdf-generation-troubleshooting-f4/is-it-possible-to-toggle-multicolumn-from-page-to-page-t255.html
in reply to: Session not transfered when using pd4ml.render() October 6, 2010 at 23:44#27637The session ID propagation of a particular web application depends on the platform and configuration of server or the application.
In J2EE/Servlet/JSP “world” it uses JSESSIONID cookie or jsessionid URL suffix, however it is possible to override the defaults. Also the configuration may disable the cookie method or the URL suffix method.
PD4ML supports the following methods of session ID propagation.
Let’s say we load https://pd4ml.com
-
pd4ml.setCookie( "JSESSIONID", cookieValue );where cookieValue is something like that: “9034657927465;path=/”
The cookie is sent with the “main” request to https://pd4ml.com as well as with the requests to the referenced resources (images, CSSs etc)
-
pd4ml.setSessionID( sessionID )In the case PD4ML embeds the sessionID only to referenced resource URLs this way:
https://pd4ml.com/i/logo.gif;jsessionid=9034657927465?other=params&if=any
If it fails with the embedded jsessionid, it repeats the request without the ID.
NOTE: It does not embed jsessionid to the original request to https://pd4ml.com, as you have control over the URL string in your Java code, so you can ebbed it by yourself and avoid possible confusions with the request repeating.
You may see the modified image URLs on STDOUT or in the server log if you switch the debug mode on:
pd4ml.enableDebugInfo();The default “jsessionid” keyword can be changed with
-Dpd4ml.sessionid.varname=othername
JVM command line parameter.
in reply to: Multiple A4 pages side by side October 5, 2010 at 14:52#28225PD4ML defined the following rendering switch:
/** * "pd4ml.document.view.mode" defines default view mode for generated document, one from: * "SinglePage", "OneColumn", "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight"; * @see PD4ML#setDynamicParams(java.util.Map) */ public static final String PD4ML_DOCUMENT_VIEW_MODE = "pd4ml.document.view.mode";
In Java it can be defined with the code:
Map m = new HashMap(); m.put(PD4Constants.PD4ML_DOCUMENT_VIEW_MODE, "TwoColumnLeft"); pd4ml.setDynamicParams(m);
PD4ML JSP custom tags do the same that way:
<pd4ml:parameters> <pd4ml:parameter key="pd4ml.document.view.mode" value="TwoColumnLeft"/> </pd4ml:parameters>
in reply to: pd4ml:header enableImageSplit problem September 23, 2010 at 11:12#28213As far as I remember we already addressed the issue. Which version of PD4ML do you use?
A better approach would be to use <pd4ml:page.header> tag instead. Some info about headers/footers in PD4ML:
html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.html
in reply to: IS IT Work HTML TD ColSpan Attribute In PD4ML ? September 22, 2010 at 21:27#28212Hmm… Of course I tried and it does work. See attached.
I copy-pasted HTML from your post.Are there any exceptions or error messages printed to STDOUT (or server’s log)?
in reply to: direction=rtl not working September 19, 2010 at 10:43#28151We’ll start to work on it from the middle of September.
in reply to: pd4ml https image urls September 19, 2010 at 10:34#28165PD4ML cache is a static hash table with soft references to loaded objects. After JVM is stopped, the cache, of course, disappears. Also a shortage or heap space may cause a cache reset.
I would recommend you to ignore the debug output and to focus on the resulting documents. If there are no missing images and external styles are applied correctly – there are no reasons for a panic.
in reply to: IS IT Work HTML TD ColSpan Attribute In PD4ML ? September 18, 2010 at 11:41#28210Try to add any content to the table cell (for example, ) or to apply the following CSS style to the table:
table { empty-cells: show; }in reply to: How To Put a Colspan of Td Tag in Table September 17, 2010 at 15:56#28208It is quite difficult to see, what you expect to render from the code.
As there is no any neighbor rows and columns, colspan=”3″ is optimized to colspan=”1″. In standard scenarios, like below, colspans work correctly.<table border=1 width=100 height=100> <tr> <td class="blank" colspan="3"> </td> </tr> <tr> <td class="blank"> </td> <td class="blank"> </td> <td class="blank"> </td> </tr> </table>
in reply to: uncorrect size for image September 17, 2010 at 15:30#27824I expected you send us at least form_ctact_titre1.jpg. Your HTML/CSS implicitly assumes dimensions of the image, which are not known to me.
@jj_ben wrote:
When i try to generate the html page, the picture of orange bars have not the correct size.
if i add the height of img directly in the css it works :
.formCtactTitre1, .formCtactTitre1Off { width:731px; height:32px; padding:7px 5px 0 30px; font-size:12px; font-weight:bold; color:#FFF; } .formCtactTitre1 { background:url(images/form_ctact_titre1.jpg) no-repeat center;height:40px; margin:5px 0 2px 0 }With height:40px; you do not scale the image, but increase the DIV height (overriding previous height:32px setting). Obviously form_ctact_titre1.jpg height is about 40px (greater than the initial 32px).
I tried to reproduce the situation, when background image height is less than the box. See attached – PD4ML does not center the background vertically. It is a good question why MS IE does. CSS requires a vertical positioning hint given explicitly:
background:url(images/form_ctact_titre1.jpg) no-repeat center center;
With the CSS change PD4ML positions the background image correctly.
-
-
AuthorPosts
