TX Text Control .NET for Windows Forms

PDFImportSettings Property

Property|Introduced in 15.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

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; }

Members

ValueDescription
GenerateLinesText only,images and paragraph formatting are discarded. This option is best suited for searching PDF files.
GenerateParagraphsGenerates paragraphs from the text flow. Images are discarded.
GenerateTextFramesDefault. Uses tables, images and text frames to create a document that best matches the original document's appearance.
GenerateTextFramesFirstPageOnlySame as GenerateTextFrames, but only the first page is loaded. Can be used for previewing the document.
GenerateXMLObsolete. This setting will be removed in a future version. Use LoadEmbeddedData instead.
LoadEmbeddedDataProvides the PDF document's metadata, form fields and text coordinates through the LoadSettings.EmbeddedData property.
LoadEmbeddedFilesDefault. 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);

Limitations

PDF only.