LoadFromFile Method (GdPictureDocumentConverter)
This method loads the source document according to a file path you have specified.
Parameters
- FilePath
- The file path of the source document.
- DocumentFormat
- A member of the DocumentFormat enumeration. Specifies a file format of the input document. Supported input document formats are listed here .
You can use a value of GdPicture14.DocumentFormat.DocumentFormatUNKNOWN if you are not sure about the document's format.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
Saving the source DOCX document as the resulting PDF document.
Using gdpictureDocumentConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()
' Loading the source document.
gdpictureDocumentConverter.LoadFromFile("input.docx", GdPicture14.DocumentFormat.DocumentFormatDOCX)
' Saving as the PDF document.
gdpictureDocumentConverter.SaveAsPDF("output.pdf", PdfConformance.PDF1_5)
End Using
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
// Loading the source document.
gdpictureDocumentConverter.LoadFromFile("input.docx", GdPicture14.DocumentFormat.DocumentFormatDOCX);
// Saving as the PDF document.
gdpictureDocumentConverter.SaveAsPDF("output.pdf", PdfConformance.PDF1_5);
}