Forum Replies Created

Viewing 15 posts - 3,796 through 3,810 (of 4,249 total)
  • Author
    Posts
  • in reply to: Licensing / Purchasing of PD4ML
    #33965

    I have just activated a 30 day evaluation license for the latest version of PD4ML. I am looking at using the tag library. I do not see any mention of the tag library in the downloads, nor do I see any mention of that in the Maven GAV on the example / evaluation pages.

    Since my customer is using the v3 tag library, they would like to upgrade to v4 to take advantage of SVG graphics, wider CSS support, and UA features. However, they would like to test this before purchasing.

    I have downloaded the license and would like either access to the appropriate CSS and tag library jars, or the appropriate Maven GAV to include the new version into a test project.

    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

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

    Hello everyone.

    Any news ?

    in reply to: Technical questions / Troubleshooting
    #33972

    Hello,

    I need to inject some html code into my custom tag content, see example below:
    <sidebar style="display: block;box-sizing: border-box;padding: 10px 20px;background-color: #ededed;"> Hi! </sidebar>

    Should become (extra tag <section> should be added right after the sidebar):
    `<sidebar>
    <section style=”display: block;box-sizing: border-box;padding: 10px 20px;background-color: #ededed;”>
    Hi!
    </section>
    </sidebar>’
    I see there is CustomTag class in PD4ML that seems to allow to customize tag processing, however I cannot understand how to use it. Documentation contains sample of <star> tag which paints a star in a PDF, but that’s far away of real life necessity, I think in most cases there is a need to customize rendering of content of the tag. Also I was not able to find any detailed documentation about CustomTag class apart of this sample with ‘<star>’ and javadocs with no description.
    Probably, someone in community or PD4ML team could help me with this.

    So, I’ve created custom SidebarTag, and in getInstance method I’m trying to replace ‘code’ parameter with another value (for example, as specified above):

    @Override
    public CustomTag getInstance(String code, FontCache fontCache) {
    code = “<sidebar><section style=\”display: block;box-sizing: border-box;padding: 10px 20px;background-color: #ededed;\”>Hi!</section></sidebar>”;
    return new SidebarTag(code, fontCache, this);
    }

    I do that before call to constructor, so I assumed that this replacement would affect the whole further processing, however, when setElement method is invoked, element param contains original html code.
    Another point where I theoretically could customize tag processing is ‘paint()’ method, however it wants to paint using graphics api, while I need this code just to be rendered.

    Could you please help me to understand how can I do that? It seems to me that the answer lies on the surface as this is pretty trivial use case, however I cannot solve it.

    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: CustomTag usage
    #33974

    Thanks for your reply.
    Unfortunately, I cannot modify original html.
    The initial problem is that sidebar tag is not rendered properly with PD4ML 4.0.9 (yes, I know this is not supported tag, but it worked properly with 3.x version). Section with styles applied are displayed separately from the text inside it (see pdf file attached: text “Hi from sidebar (no styling)” should be inside grey block).
    I’ve reported issue about that, but didn’t get a reply yet. Should I provide more details on this issue here?

    So, I was looking for a workaround, and the idea was to modify <sidebar>’s internals “on fly”.

    Attachments:
    You must be logged in to view attached files.
    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
    #33977

    Thank you!
    But I still didn’t receive an email regarding sidebar issue that I reported (spam folder is empty as well).
    Could you please let me know where can our team track the state of the issue? Maybe there is any tracking system available for clients?
    Also, when snapshot build is planned to be released?

    in reply to: Technical questions / Troubleshooting
    #33980

    PD4ML v3 has separate api method to configure whether to split images (pd4ml3.enableImgSplit(false) to avoid splitting).
    I’m trying to do the same with v4, and found that wrapper org.zefer.pd4ml.PD4ML adds styling for this purpose (also found the same solution somewhere in the internet):
    this.addStyle("IMG {page-break-inside: avoid}", true);

    So, I try to do the same using new api, but image is still got split:
    pd4ml.addStyle("IMG {page-break-inside: avoid;}", true);
    If use old-api wrapper, get the same result.

    Could you please help if I miss some additional configuration or pd4ml?

    Please see original html, java code and resulting pdf attached.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Avoid image split in v4
    #33982

    html and java files are not permitted, so trying to load them as zip archive

    Attachments:
    You must be logged in to view attached files.
    in reply to: CustomTag usage
    #33984

    Hello. Are there any updates on my question?

    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
    #33986

    Well, we expect the custom tag issue fix will be available tomorrow morning with the nightly 4.0.9fx2 snapshot build.

    Thank you! Will check tomorrow.

    I am wondering why you do not receive our Helpdesk replies. Your gmail address looks correct.

    That’s really strange. I receive notifications from forum (sender is <sales@pd4ml.com>), but not from support. Is sender email for support different?
    I’m going to submit another issue report, so don’t want to miss notifications…

    in reply to: CustomTag usage
    #33987

    Hello,

    For basic case (sidebar tag only) the issue is solved.
    However, for more complex structure it is still not working, please see sample structure:
    <section> <sidebar style="display: block;box-sizing: border-box;padding: 10px 20px;background-color: #ededed;"> <section> <h2>Header</h2> <section>Section section</section> <section>Section section 2</section> </section> </sidebar> </section>

    Could you please take a look? Should I report another issue for that (I’ll try to register another account for different email)?
    Thanks in advance.

    Attachments:
    You must be logged in to view attached files.
    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.

Viewing 15 posts - 3,796 through 3,810 (of 4,249 total)