- This topic has 13 replies, 2 voices, and was last updated Apr 20, 2015
17:11:24 by PD4ML.
April 14, 2015 at 13:54#27010
in our HTML we are including dynamic params (http://pd4ml.com/cookbook/pdf_dynamic_values.htm)
We need to include a breakline inside this dynamic values.
We tried with
but HTML value are escaped …
Is-there any way to include a breakline ?
ThanksApril 14, 2015 at 14:00#29715
No, it is not possible due to the current PD4ML architecture specifics.
Obviously the only solution is to define a number placeholders:
and substitute them correspondingly to a needed number of linesApril 15, 2015 at 15:52#29716
This is not an option for us because we don’t know the number of lines when building the HTML template
I tried another way:
My HTML template contains
I tried to include breakline usign the java string : n But this fails also... Does this means that you are also escaping "n" or did I miss something ?April 15, 2015 at 18:44#29717
A placeholder (i.e. $[line1]) substitution is performed after HTML is parsed: that means a DOM-like structure is already build.
code results a creation of a block element contains a single content element.
results a block element with two content elements.
A placeholder substitution is applied to the content elements.
When line1=”text 1
text 2″ dynamic data comes, in theory it should place “text 1” instead of $[line1], delete the trailing content (if any), create a new content element object, assign it to the same parent block object, put “text 2” to it, append the trailing content, deleted before. The functionality is not foreseen and not implemented.
If the situation is critical and there is no feasible workaround – we could urgently implement that on a paid basis, but I need to estimate efforts with the developers.April 15, 2015 at 20:48#29718
Yes please estimate the effort required.
To get back to my question on
: if I have
line1 = text 1ntext 2
then the HTML output should be
text 1 text 2
which is a way to display a breakline
but actually it is:
text 1 text 2
Why ? Did I miss something ?April 16, 2015 at 11:27#29719
According to our moderate estimations an implementation of the feature (+ reduced QA pass) would require 5 m/hours which would cost 400 EUR
But… I’ve just tried line1 = text 1ntext 2 – and it works (correctly breaks the line) on my workstation even without
. It is not quite clear why it works and under which conditions - I am going to investigate. BTW: please publish a Java/JSP/etc code snippet of the way you define line1 = text 1ntext 2April 16, 2015 at 12:49#29720
dynamicParametersMap.put(“report.generation”, “ericntestnbreakline”);April 16, 2015 at 13:22#29721
It is strange, your sample also works on my side. Which PD4ML version do you currently use?
I did some more testing – even if it works on my workstation, it still renders not correctly: it does not inform its block parent element, that the new content requires more vertical space. As a result we have a broken layout. See attached.
So a proper feature implementation is still actual.April 16, 2015 at 19:23#29722
we are using version 395fx3
The option for the paid feature is something that we may afford.
Could you please give me more details on what is the function you can develop ?April 17, 2015 at 13:02#29723
As by “ericntestnbreakline” syntax there is a probability of a backslash un-escaping or misinterpreting in some environments (or in CLI), it is safer to support “eric
breakline” syntax. However ideally we’ll try to support both.
In this particular case the given dynamic value will be represented as three lines of text in the resulting PDF.April 17, 2015 at 15:37#29724
Support for syntax “eric
breakline” is nice for me
How can we proceed ?April 17, 2015 at 16:47#29725
We could start the development on Monday. If there is no pitfalls found and we are sure about the delivery time, I’ll let you know and provide you with payment options. As soon as the feature is ready, we’ll send to you a tested build by email.April 20, 2015 at 10:00#29726
could you please get back to me with payment options
ThanksApril 20, 2015 at 17:11#29727
We’ve just implemented a support for multi-line dynamic values.
markup can be used in a dynamic value to force a line break.
I’ll send you a preview build by email to be tested on your side during our QA phase.
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.