Forum Replies Created

Viewing 15 posts - 181 through 195 (of 224 total)
  • Author
    Posts
  • in reply to: Encoding problem
    #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.

    #34010

    If 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.

    #34008

    Thank 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
    #34004

    Of 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
    #34002

    So, 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
    #34000

    Could 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
    #33996

    1. 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.

    #33992

    The similar methods are available from com.pd4ml.PD4ML (v4 API) directly. There are setAuthorName(), setDocumentTitle() and addMetadata() for arbitrary meta data settings.

    https://pd4ml.tech/javadoc/com/pd4ml/PD4ML.html#addMetadata-java.lang.String-java.lang.String-boolean-

    Document creator property can be overridden only via dedicated environment variable.

    in reply to: CustomTag usage
    #33989

    I 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
    #33985

    Hi! 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
    #33976

    I’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
    #33973

    Hi! 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
    #33966

    Hi!

    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-applications

    #33963

    The temp dir is needed not by PD4ML itself, but by the font subsystem of JVM.

    java.awt.Font.createFont() creates java.awt.Font instance 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 internal java.awt.Font.createFont() logic, it is only possible to re-define temp dir location with java.io.tmpdir system property.

    in reply to: Zoom after click on internal link
    #33960

    Hi! We’ll investigate for possible workarounds. There is a couple of ideas…

Viewing 15 posts - 181 through 195 (of 224 total)