• Hello Julian,

    Having trouble getting embedded data in a PDF. I can embed data in an RTF file using AddDataFile method, but when exporting using TWPPDFExport there is no embedded data.

    Regards,
    Paul Cunningham

    Test console code.

  • Hello Julian,

    I do not understand your reply. The AddDataFile is being used before the exporting has begun, the RTF file already has the embedded data.

    Did you see the line ?

    Code
    Editor.SaveToFile('c:\embed.rtf'); // This has the embedded manual

    The latest manual has the statement; "Using WPTools 6 and wPDF V3 it is now possible to add an object to the PDF file which holds embedded data.", and has some example code very similar to what I have posted.

    Cheers,
    Paul

    • Offizieller Beitrag

    I now understand what You mean.

    Please open the filöe WPOBJ_Container.pas and make sure the record TPDFEmbeddedFileElement is code like this:

    TPDFEmbeddedFileElement = packed record
    DataLen: Integer; // Length, this recod + data !
    DataNr: Integer; // Incremented Nr, will be assigned
    FS: Integer; // TPDFEmbeddedFileElementFS;
    SubType: array[0..39] of AnsiChar; // MIME Type
    ModDate, CreateDate: Extended; // Time Values
    Compress: Integer; // TPDFEmbeddedFileElementCompress
    Data: array of Byte; // data follows
    end;