Forum Replies Created
-
AuthorPosts
-
in reply to: Encoding problem November 9, 2020 at 12:26#34012
The string you received is typical for a charset mismatch.
As you see your test string is not well-formed HTML. You may solve the issue by a prefixing the string with an HTML header defines the correct charset – in your case it should be UTF-8.
Or you can use readHTML() API method with an encoding parameter, i.e.
https://pd4ml.tech/javadoc/com/pd4ml/PD4ML.html#readHTML-java.io.InputStream-java.net.URL-java.lang.String-
Try to specify “UTF8” there.in reply to: Numerated lists are saved differently in RTF format by pd4ml v3 and v4 November 9, 2020 at 11:32#34010If v3 and v4 RTF output differs in such details – it looks like an issue from our perspective. We are trying to keep RTF modules in v3 and v4 branches in sync.
Unfortunately we cannot assign the high priority to the issue – right now there is a number of urgent tasks to be completed. But I hope we’ll manage to analyze it this week.
in reply to: Numerated lists are saved differently in RTF format by pd4ml v3 and v4 November 6, 2020 at 10:21#34008Thank you for the report!
We’ll address the issue and let you know as soon as there is a solution or workaround.
in reply to: PageSize and HtmlWidth October 27, 2020 at 09:30#34004Of course, it should not fail or get stuck depending on htmlWidth value. We plan to address the issue tomorrow – in the last days there was no time frame for work on it. Sorry, this is taking so long.
in reply to: PageSize and HtmlWidth October 23, 2020 at 13:04#34002So, as I understand, there is no any strict recommendation that HtmlWidth should be less than PageSize.width, it just impacts the scale how PDF is generated (the more HtmlWidth the smaller scale). Correct?
No. htmlWidth value should take into account only the HTML content. Let’s say you have a 1000px-wide HTML table. If you define htmlWidth=850, the not fitting 150px of the table are going to be cut in the rendered layout. The visible 850px will be mapped to the target paper width, independently if the format is A1 or A4 or A6.
in reply to: PageSize and HtmlWidth October 23, 2020 at 11:23#34000Could you please explain how correlate PageSize and HtmlWidth settings of PD4ML class?
PageSize is the target page format, which dimensions given in physical units (mm, in, pt etc). htmlWidth can bee seen as a width of a virtual “web browser” frame. htmlWidth is mapped to pageSize.width (minus horizontal margins).
See /pd4ml-v4-programmers-manual/#customizing
PD4ML just get stuck and doesn’t reply
We’ll analyze and reply regarding the issue via the Helpdesk
in reply to: PD4ML rendering by URLs questions October 19, 2020 at 13:12#339961. Right, there is no possibility to pass an array of URLs or input streams anymore. In our plans to support a possibility to call readHTML() multiple times: to append new docs to already loaded one(s). Before the feature is implemented, you may just merge multiple HTML docs to a single one and pass it to PD4ML at once.
2. It was not supported in v3. A workaround is the same as in #1: merge HTMLs before the conversion.
in reply to: Support for adding custom document meta data to existing PDF documents October 15, 2020 at 13:09#33992The similar methods are available from com.pd4ml.PD4ML (v4 API) directly. There are setAuthorName(), setDocumentTitle() and addMetadata() for arbitrary meta data settings.
Document creator property can be overridden only via dedicated environment variable.
in reply to: CustomTag usage October 15, 2020 at 08:57#33989I am not sure if a nesting of section tags is semantically correct: usually a document divided to sections, sections to articles. However from technical perspective a section should be just as a regular div has no restrictions for a nesting. (And now the section tag is treated rather as a paragraph, which is not correct)
We’ll align the issue asap.
BTW: do you still receive no Helpdesk notifications? Yesterday it looked like we fixed a configuration issue.
in reply to: CustomTag usage October 14, 2020 at 10:57#33985Hi! Unfortunately we do not provide a direct customer access to the issue tracking system. I am wondering why you do not receive our Helpdesk replies. Your gmail address looks correct.
Well, we expect the custom tag issue fix will be available tomorrow morning with the nightly 4.0.9fx2 snapshot build.
in reply to: CustomTag usage October 13, 2020 at 10:15#33976I’ve just replied to the Helpdesk ticket – from it was finally clear what kind of issue you faced with.
As I see, the SIDEBAR tag implicitly closes and does not allow any nested content/markup, which is wrong.
It looks like a regression in PD4ML defaults. A fix will be available with the next snapshot build.in reply to: CustomTag usage October 13, 2020 at 09:43#33973Hi! We added the custom tags support to make possible a definition of features, not achievable with the standard HTML approach, for example a support of SVG vector graphics or MathML. It you need a simple content or HTML markup injection, the custom tags seem to be an overkill.
First, do not forget that the input of PD4ML is HTML. You may always pre-process it as a text before it is passed to readHTML(). Let’s say, define your proprietary placeholders in HTML and substitute them with actual data before PD4ML takes part. In the case “the actual data” can be either content string or HTML markup.
In the case you need to insert only text content, you may use PD4ML’s template mechanism. Define in your HTML placeholders in the format: $[var] ($[page], $[total] and $[title] are reserved) and substitute them with the API call:
https://pd4ml.tech/javadoc/com/pd4ml/PD4ML.html#setDynamicData-java.util.Map-
The advantage of the method is that you do not need to pre-read HTML to a buffer (if it is read-only or comes from HTTP) to pre-process. Disadvantage: you cannot pass HTML markup via the templating mechanism.
There is also injectHtml() API call, but it allows to inject HTML portion either immediately after opening <body> or jus before the closing BODY tag.
Or do you have a very special usage scenario, the above does not help?
in reply to: Evaluation license for tag libraries September 24, 2020 at 19:31#33966Hi!
PD4ML taglib v4 is included to the main pd4ml*.jar. You can add it to your Maven project as explained by the link:
https://pd4ml.tech/support-topics/maven/Here is the taglib usage manual:
https://pd4ml.tech/support-topics/pd4ml-v4-programmers-manual/#pd4ml-jsp-taglib-and-web-applicationsin reply to: How to check when there is no temp folder to use the font cache ? September 14, 2020 at 09:00#33963The temp dir is needed not by PD4ML itself, but by the font subsystem of JVM.
java.awt.Font.createFont()createsjava.awt.Fontinstance from a given byte array, but as a rule (obviously it is platform-dependent) it needs to create a corresponding font file in the temp dir. We cannot control the internaljava.awt.Font.createFont()logic, it is only possible to re-define temp dir location withjava.io.tmpdirsystem property.in reply to: Zoom after click on internal link September 2, 2020 at 10:17#33960Hi! We’ll investigate for possible workarounds. There is a couple of ideas…
-
AuthorPosts
