AddPDFA3AssociatedFileFromString
Documenteigenschappen
Beschrijving
Maakt uit bytes in het geheugen een embedded-filestream, voegt de filespecificatie toe aan de attachment-nametree van het document en registreert deze in de Catalog-array /AF voor PDF/A-3-workflows
Syntaxis
Delphi
Function TPDFlib.AddPDFA3AssociatedFileFromString(Const FileName, MIMEType, Description, Relationship: WideString; Const FileBytes: AnsiString): Integer;
Syntaxis
| FileName | De getoonde bestandsnaam voor de bijlage, zoals invoice.xml |
|---|---|
| MIMEType | Het MIME-type dat naar de ingesloten-bestandsstream wordt geschreven, zoals text/xml of application/xml |
| Description | De optionele /Desc-tekst die naar de filespecificatie wordt geschreven |
| Relationship | De /AFRelationship-waarde, meestal Source, Data, Alternative, Supplement of Unspecified |
| FileBytes | De rauwe bytes die in de ingesloten-bestandsstream moeten worden opgeslagen |
Retourwaarden
| 0 | Geen actief document, ongeldige parameters of het huidige document staat niet in de PDF/A-3-modus |
|---|---|
| Non-zero | De objecthandle van de nieuw aangemaakte filespecificatie |
Opmerkingen
Het bestand is zichtbaar in de documentbijlagenlijst en wordt ook gerefereerd door de /AF-array van de Catalog die PDF/A-3 geassocieerde bestanden vereisen
Voor standaard Factur-X-, ZUGFeRD- of XRechnung-factuur-XML gebruikt u bij voorkeur AddFacturXAssociatedFileFromString, zodat de factuurmetadata en profielcontroles consistent worden geschreven
Voorbeeld
// Attach source XML to a PDF/A-3b document
var
FileID: Integer;
begin
PDF.SetPDFAMode(5);
PDF.NewDocument;
FileID := PDF.AddPDFA3AssociatedFileFromString(
'invoice.xml',
'text/xml',
'Invoice source data',
'Source',
InvoiceXML);
if FileID = 0 then Exit;
PDF.SaveToFile('archive.pdf');
end;
Zie ook
AddFacturXAssociatedFileFromString, SetPDFAMode, SetEmbeddedFileAFRelationship, AddEmbeddedFile