GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / EmbedInvoiceData Method / EmbedInvoiceData(String,PdfInvoiceDataFormat) Method
The file path of the file to embed. Any kind of file, and any numbers of files, can be embedded into a PDF file.
A member of the PdfInvoiceDataFormat enumeration, specifying the embedded xml invoice data format.
Example





In This Topic
EmbedInvoiceData(String,PdfInvoiceDataFormat) Method
In This Topic
Embeds (attaches) a invoice data from file specified by the file path into the currently loaded PDF document.
Syntax
'Declaration
 
Public Overloads Function EmbedInvoiceData( _
   ByVal FilePath As String, _
   ByVal InvoiceDataFormat As PdfInvoiceDataFormat _
) As GdPictureStatus
public GdPictureStatus EmbedInvoiceData( 
   string FilePath,
   PdfInvoiceDataFormat InvoiceDataFormat
)
public function EmbedInvoiceData( 
    FilePath: String;
    InvoiceDataFormat: PdfInvoiceDataFormat
): GdPictureStatus; 
public function EmbedInvoiceData( 
   FilePath : String,
   InvoiceDataFormat : PdfInvoiceDataFormat
) : GdPictureStatus;
public: GdPictureStatus EmbedInvoiceData( 
   string* FilePath,
   PdfInvoiceDataFormat InvoiceDataFormat
) 
public:
GdPictureStatus EmbedInvoiceData( 
   String^ FilePath,
   PdfInvoiceDataFormat InvoiceDataFormat
) 

Parameters

FilePath
The file path of the file to embed. Any kind of file, and any numbers of files, can be embedded into a PDF file.
InvoiceDataFormat
A member of the PdfInvoiceDataFormat enumeration, specifying the embedded xml invoice data format.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
This method is only allowed for use with non-encrypted documents.

This method is only usable for PDF/A-3 documents.

Example
Embedding a text file into the PDF document.
Using gdpicturePDF = New GdPicturePDF()
{
    gdpicturePDF.LoadFromFile("pdfa3.pdf", True)
    gdpicturePDF.EmbedInvoiceData("factur-x.xml", PdfInvoiceDataFormat.FacturX_1_0)
    gdpicturePDF.SaveToFile("facturx_document.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
    gdpicturePDF.LoadFromFile("pdfa3.pdf", true);
    gdpicturePDF.EmbedInvoiceData("factur-x.xml", PdfInvoiceDataFormat.FacturX_1_0);
    gdpicturePDF.SaveToFile("facturx_document.pdf");
}
See Also