Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #26856

    Hi there,

    I am trying to embed a document within generated PDF file but the only thing I am getting is an icon but there is no option to click on the icon and open embedded document. I have literally Copied-Pasted your code example like this:


    What could I be doing wrong?
    I can attach a full HTML but I see no option to attach a file.

    Best regards


    Does the attachment appear in the side bar (“Attachments” tab on the left window side of Acroread)?


    @PD4ML wrote:

    Does the attachment appear in the side bar (“Attachments” tab on the left window side of Acroread)?

    Hi there,
    I had to rewrite the whole thing and that little icon is now appearing but it is still not working correctly.
    If I am displaying contents of a text file and set description=”FileAttachment.txt” then I can open text file attachments by clicking a little icon in generated PDF, great. However, when I try to attach and open a Word Document I am getting the following error message:
    “This file does not have a program associated with it for performing this action. Please install…”.
    When I update description=”Fileattachment.docx” then I can open Word documents only. This will not work of course as business users can attach any type of file so description=”FileAttachment.attachmenttype” must be dynamically generated to reflect attached file extension.

    Is there a way of doing this please?

    Thank you in advance.


    Normally PD4ML extracts a file name from attachments URL. In your case an attachment body is passed as a base64-encoded stream of bytes with no file name hint – in such situation a description attribute with a file name is needed.

    In the forthcoming v398fx3 we implemented an “auto-guess” of file extension by a mime type. If there is no description, it will extract a mime type from “data:” prefix.

    For example:

    [language=html:3vavs04u] data:text/plain;base64,YSxiLGMsZCxlDQp2YWx1ZSAxLCB2YWx1ZSAyLCB2YWx1ZSAzLCB2YWx1ZSA0 [/language:3vavs04u]

    auto-names the attachment as “attachment.txt”

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

The forum ‘General questions / FAQ’ is closed to new topics and replies.