PDFImportSettings Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Specifies how the document structure is generated when a PDF document is imported. Adobe PDF format is a low-level output format. In most cases in contains only geometrical information about the single characters. A high-level document structure specifying paragraphs, tables, sections and styles is not available. The TXTextControl PDF import filter will reconstruct the original document according to the value of the PDFImportSettigs property.
Syntax
public PDFImportSettings PDFImportSettings { get; set; }Public Property PDFImportSettings As PDFImportSettingsMembers
| Value | Description |
|---|---|
| GenerateLines | Text only,images and paragraph formatting are discarded. This option is best suited for searching PDF files. |
| GenerateParagraphs | Generates paragraphs from the text flow. Images are discarded. |
| GenerateTextFrames | Default. Uses tables, images and text frames to create a document that best matches the original document's appearance. |
| GenerateTextFramesFirstPageOnly | Same as GenerateTextFrames, but only the first page is loaded. Can be used for previewing the document. |
| GenerateXML | Obsolete. This setting will be removed in a future version. Use LoadEmbeddedData instead. |
| LoadEmbeddedData | Provides the PDF document's metadata, form fields and text coordinates through the LoadSettings.EmbeddedData property. |
| LoadEmbeddedFiles | Default. Files embedded in the PDF document are loaded and provided through the LoadSettings.EmbeddedFiles property. |
Examples
The following example configures how a WordprocessingML template is loaded by using LoadSettings.PDFImportSettings.
LoadSettings loadSettings = new();
loadSettings.PDFImportSettings = PDFImportSettings.GenerateLines;
Console.WriteLine($"PDFImport Settings used by Load Settings: {loadSettings.PDFImportSettings}");
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);Dim loadSettings As New LoadSettings()
loadSettings.PDFImportSettings = PDFImportSettings.GenerateLines
Console.WriteLine($"PDFImport Settings used by Load Settings: {loadSettings.PDFImportSettings}")
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings)Limitations
PDF only.