Class PdfLoadOptions
Namespace: Aspose.Words.Loading
Assembly: Aspose.Words.dll (26.2.0)
Allows to specify additional options when loading Pdf document into a Aspose.Words.Document object.
To learn more, visit the Specify Load Options documentation article.
public class PdfLoadOptions : LoadOptionsInheritance
object ← LoadOptions ← PdfLoadOptions
Inherited Members
LoadOptions.Equals(object) , LoadOptions.LoadFormat , LoadOptions.Password , LoadOptions.BaseUri , LoadOptions.Encoding , LoadOptions.ResourceLoadingCallback , LoadOptions.WarningCallback , LoadOptions.ProgressCallback , LoadOptions.PreserveIncludePictureField , LoadOptions.ConvertShapeToOfficeMath , LoadOptions.FontSettings , LoadOptions.TempFolder , LoadOptions.ConvertMetafilesToPng , LoadOptions.MswVersion , LoadOptions.UpdateDirtyFields , LoadOptions.IgnoreOleData , LoadOptions.UseSystemLcid , LoadOptions.LanguagePreferences , LoadOptions.RecoveryMode , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Shows how to skip images during loading PDF files.
PdfLoadOptions options = new PdfLoadOptions();
options.SkipPdfImages = isSkipPdfImages;
options.PageIndex = 0;
options.PageCount = 1;
Document doc = new Document(MyDir + "Images.pdf", options);
NodeCollection shapeCollection = doc.GetChildNodes(NodeType.Shape, true);
if (isSkipPdfImages)
Assert.That(0, Is.EqualTo(shapeCollection.Count));
else
Assert.That(0, Is.Not.EqualTo(shapeCollection.Count));Constructors
PdfLoadOptions()
public PdfLoadOptions()Properties
PageCount
Gets or sets the number of pages to read. Default is MaxValue which means all pages of the document will be read.
public int PageCount { get; set; }Property Value
Examples
Shows how to skip images during loading PDF files.
PdfLoadOptions options = new PdfLoadOptions();
options.SkipPdfImages = isSkipPdfImages;
options.PageIndex = 0;
options.PageCount = 1;
Document doc = new Document(MyDir + "Images.pdf", options);
NodeCollection shapeCollection = doc.GetChildNodes(NodeType.Shape, true);
if (isSkipPdfImages)
Assert.That(0, Is.EqualTo(shapeCollection.Count));
else
Assert.That(0, Is.Not.EqualTo(shapeCollection.Count));PageIndex
Gets or sets the 0-based index of the first page to read. Default is 0.
public int PageIndex { get; set; }Property Value
Examples
Shows how to skip images during loading PDF files.
PdfLoadOptions options = new PdfLoadOptions();
options.SkipPdfImages = isSkipPdfImages;
options.PageIndex = 0;
options.PageCount = 1;
Document doc = new Document(MyDir + "Images.pdf", options);
NodeCollection shapeCollection = doc.GetChildNodes(NodeType.Shape, true);
if (isSkipPdfImages)
Assert.That(0, Is.EqualTo(shapeCollection.Count));
else
Assert.That(0, Is.Not.EqualTo(shapeCollection.Count));SkipPdfImages
Gets or sets the flag indicating whether images must be skipped while loading PDF document. Default is false.
public bool SkipPdfImages { get; set; }Property Value
Examples
Shows how to skip images during loading PDF files.
PdfLoadOptions options = new PdfLoadOptions();
options.SkipPdfImages = isSkipPdfImages;
options.PageIndex = 0;
options.PageCount = 1;
Document doc = new Document(MyDir + "Images.pdf", options);
NodeCollection shapeCollection = doc.GetChildNodes(NodeType.Shape, true);
if (isSkipPdfImages)
Assert.That(0, Is.EqualTo(shapeCollection.Count));
else
Assert.That(0, Is.Not.EqualTo(shapeCollection.Count));