EmbedInvoiceData(String,PdfInvoiceDataFormat) Method
Embeds (attaches) a invoice data from file specified by the file path into the currently loaded PDF document.
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.
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");
}