Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26923

    Hi,
    i want to disable the inline-attachment feature with the following lines:

    <br /> HashMap m = new HashMap();<br /> m.put(PD4Constants.PD4ML_DISABLE_EXTERNAL_ATTACHMENTS, "true");<br /> pd4ml.setDynamicParams(m);<br />

    But this doesn’t work for me. I always get a PDF with embedded attachments. The data source is a domino-XML.

    Thanks for your help

    #29536

    There is a probability you use PD4ML version, which does not support the feature yet. Could you please check generated PDF file properties: it should list PD4ML version used. Or alternatively send a problem PDF sample to support pd4ml com

    #29535

    From PD4ML documentation:

    [language=java:3jrsrudr]/**
    * “pd4ml.disable.external.attachments”
    * if “true”, it does not load attachments () from local system and from URL. It does not impact inline-defined attachments.
    * @see PD4ML#setDynamicParams(java.util.Map)
    */
    public static final String PD4ML_DISABLE_EXTERNAL_ATTACHMENTS = “pd4ml.disable.external.attachments”;[/language:3jrsrudr]

    Attachments come from Lotus Notes/Domino XML (DXL) are inline, that is the reason the setting does not disable them by default.

    There are workarounds:

    1.

    PdfAgentR7.java sample code has the following section:

    [language=java:3jrsrudr]if ( dontPassAttachmentsToXalan ) {
    xml = extractAttachments(xml);
    }[/language:3jrsrudr]

    extractAttachments() method extracts inline attachments from DXL, stores them as temporal files and inserts references to the temp files instead on the attachment bodies. In the case PD4ML_DISABLE_EXTERNAL_ATTACHMENTS flag works as expected.

    2. Suppress attachments on CSS level:

    [language=java:3jrsrudr]pd4ml.addStyle(“pd4ml-attachment {display: none}”, true);[/language:3jrsrudr]

    In the case an invoking of extractAttachments() also makes sense, as it prevents bulky base64-encoded attachment data from being passed to XALAN.

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.