Class representing PDF document More...

Inherits System::IDisposable, and Aspose::Pdf::ISupportsMemoryCleanup.

Classes

class  CutByRestrictionWrapper
 
class  IDocumentFontUtilities
 
class  OptimizationOptions
 

Public Types

using FontSubstitutionHandler = System::MulticastDelegate< void(System::SharedPtr< Text::Font >, System::SharedPtr< Text::Font >)>
 
using CallBackGetHocr = System::MulticastDelegate< System::String(System::SharedPtr< System::Drawing::Image >)>
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Public Member Functions

System::SharedPtr< JavaScriptCollectionget_JavaScript ()
 Collection of JavaScript of document level. More...
 
System::SharedPtr< Aspose::Pdf::PageInfoget_PageInfo ()
 Gets the page info.(for generator only) More...
 
void set_PageInfo (System::SharedPtr< Aspose::Pdf::PageInfo > value)
 Sets the page info.(for generator only) More...
 
bool get_IsPdfaCompliant ()
 Gets the is document pdfa compliant. More...
 
bool get_IsPdfUaCompliant ()
 Gets the is document pdfua compliant. More...
 
bool get_IsXrefGapsAllowed ()
 Gets the is document pdfa compliant. More...
 
void set_IsXrefGapsAllowed (bool value)
 Sets the is document pdfa compliant. More...
 
System::SharedPtr< NamedDestinationCollectionget_NamedDestinations ()
 Collection of Named Destination in the document. More...
 
System::SharedPtr< DestinationCollectionget_Destinations ()
 Gets the collection of destinations. Obsolete. Please use NamedDestinations. More...
 
Aspose::Pdf::PdfFormat get_PdfFormat ()
 Gets PDF format More...
 
bool get_EmbedStandardFonts ()
 Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false. More...
 
void set_EmbedStandardFonts (bool value)
 Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false. More...
 
System::SharedPtr< Document::IDocumentFontUtilitiesget_FontUtilities ()
 IDocumentFontUtilities instance More...
 
System::SharedPtr< Aspose::Pdf::Collectionget_Collection ()
 Gets collection of document. More...
 
void set_Collection (System::SharedPtr< Aspose::Pdf::Collection > value)
 Gets collection of document. More...
 
System::String get_Version ()
 Gets a version of Pdf from Pdf file header. More...
 
System::SharedPtr< Annotations::IAppointmentget_OpenAction ()
 Gets action performed at document opening. More...
 
void set_OpenAction (System::SharedPtr< Annotations::IAppointment > value)
 Sets action performed at document opening. More...
 
bool get_HideToolBar ()
 Gets flag specifying whether toolbar should be hidden when document is active. More...
 
void set_HideToolBar (bool value)
 Sets flag specifying whether toolbar should be hidden when document is active. More...
 
bool get_HideMenubar ()
 Gets flag specifying whether menu bar should be hidden when document is active. More...
 
void set_HideMenubar (bool value)
 Sets flag specifying whether menu bar should be hidden when document is active. More...
 
bool get_HideWindowUI ()
 Gets flag specifying whether user interface elements should be hidden when document is active. More...
 
void set_HideWindowUI (bool value)
 Sets flag specifying whether user interface elements should be hidden when document is active. More...
 
bool get_FitWindow ()
 Gets flag specifying whether document window must be resized to fit the first displayed page. More...
 
void set_FitWindow (bool value)
 Sets flag specifying whether document window must be resized to fit the first displayed page. More...
 
bool get_CenterWindow ()
 Gets flag specifying whether position of the document's window will be centerd on the screen. More...
 
void set_CenterWindow (bool value)
 Sets flag specifying whether position of the document's window will be centerd on the screen. More...
 
bool get_DisplayDocTitle ()
 Gets flag specifying whether document's window title bar should display document title. More...
 
void set_DisplayDocTitle (bool value)
 Sets flag specifying whether document's window title bar should display document title. More...
 
System::SharedPtr< PageCollectionget_Pages ()
 Gets collection of document pages. Note that pages are numbered from 1 in collection. More...
 
System::SharedPtr< OutlineCollectionget_Outlines ()
 Gets document outlines. More...
 
System::SharedPtr< Annotations::DocumentActionCollectionget_Actions ()
 Gets document actions. This property is instance of DocumentActions class which allows to get/set BeforClosing, BeforSaving, etc. actions. More...
 
System::SharedPtr< Aspose::Pdf::Forms::Formget_Form ()
 Gets Acro Form of the document. More...
 
System::SharedPtr< EmbeddedFileCollectionget_EmbeddedFiles ()
 Gets collection of files embedded to document. More...
 
Aspose::Pdf::Direction get_Direction ()
 Gets reading order of text: L2R (left to right) or R2L (right to left). More...
 
void set_Direction (Aspose::Pdf::Direction value)
 Sets reading order of text: L2R (left to right) or R2L (right to left). More...
 
Aspose::Pdf::PageMode get_PageMode ()
 Gets page mode, specifying how document should be displayed when opened. More...
 
void set_PageMode (Aspose::Pdf::PageMode value)
 Sets page mode, specifying how document should be displayed when opened. More...
 
Aspose::Pdf::PageMode get_NonFullScreenPageMode ()
 Gets page mode, specifying how to display the document on exiting full-screen mode. More...
 
void set_NonFullScreenPageMode (Aspose::Pdf::PageMode value)
 Sets page mode, specifying how to display the document on exiting full-screen mode. More...
 
Aspose::Pdf::PageLayout get_PageLayout ()
 Gets page layout which shall be used when the document is opened. More...
 
void set_PageLayout (Aspose::Pdf::PageLayout value)
 Sets page layout which shall be used when the document is opened. More...
 
PrintDuplex get_Duplex ()
 Gets print duplex mode handling option to use when printing the file from the print dialog. More...
 
void set_Duplex (PrintDuplex value)
 Sets print duplex mode handling option to use when printing the file from the print dialog. More...
 
System::String get_FileName ()
 Name of the PDF file that caused this document More...
 
System::SharedPtr< DocumentInfoget_Info ()
 Gets document info. More...
 
System::SharedPtr< Aspose::Pdf::Metadataget_Metadata ()
 Document metadata. (A PDF document may include general information, such as the document's title, author, and creation and modification dates. Such global information about the document (as opposed to its content or structure) is called metadata and is intended to assist in cataloguing and searching for documents in external databases.) More...
 
System::SharedPtr< Structure::RootElementget_LogicalStructure ()
 Gets logical structure of the document. More...
 
System::Nullable< Aspose::Pdf::CryptoAlgorithmget_CryptoAlgorithm ()
 Gets security settings if document is encrypted. If document is not encrypted then corresponding exception will be raised in .net 1.1 or CryptoAlgorithm will be null for other .net versions. More...
 
bool get_IsLinearized ()
 Gets a value indicating whether document is linearized. More...
 
void set_IsLinearized (bool value)
 Sets a value indicating whether document is linearized. More...
 
int32_t get_Permissions ()
 Gets permissions of the document. More...
 
bool get_IsEncrypted ()
 Gets encrypted status of the document. True if document is encrypted. More...
 
System::SharedPtr< Aspose::Pdf::Idget_Id ()
 Gets the ID. More...
 
System::SharedPtr< Colorget_Background ()
 Gets the background color of the document. More...
 
void set_Background (System::SharedPtr< Color > value)
 Sets the background color of the document. More...
 
bool get_OptimizeSize ()
 Gets optimization flag. When pages are added to document, equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false. More...
 
void set_OptimizeSize (bool value)
 Sets optimization flag. When pages are added to document, equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false. More...
 
bool get_AllowReusePageContent ()
 Allows to merge page contents to optimize docuement size. If used then differnet but duplicated pages may reference to the same content object. Please note that this mode may cause side effects like changing page content when other page is changed. More...
 
void set_AllowReusePageContent (bool value)
 Allows to merge page contents to optimize docuement size. If used then differnet but duplicated pages may reference to the same content object. Please note that this mode may cause side effects like changing page content when other page is changed. More...
 
bool get_IgnoreCorruptedObjects ()
 Gets flag of ignoring errors in source files. When pages from source document copied into destination document, copying process is stopped with exception if some objects in source files are corrupted when this flag is false. example: dest.Pages.Add(src.Pages); If this flag is set to true then corrupted objects will be replaced with empty values. By default: true. More...
 
void set_IgnoreCorruptedObjects (bool value)
 Sets flag of ignoring errors in source files. When pages from source document copied into destination document, copying process is stopped with exception if some objects in source files are corrupted when this flag is false. example: dest.Pages.Add(src.Pages); If this flag is set to true then corrupted objects will be replaced with empty values. By default: true. More...
 
System::SharedPtr< PageLabelCollectionget_PageLabels ()
 Gets page labels in the document. More...
 
bool get_EnableObjectUnload ()
 Get or sets flag which enables document partially be unloaded from memory. This allow to decrease memory usage but may have negative effect on perofmance. More...
 
void set_EnableObjectUnload (bool value)
 Get or sets flag which enables document partially be unloaded from memory. This allow to decrease memory usage but may have negative effect on perofmance. More...
 
System::SharedPtr< Tagged::ITaggedContentget_TaggedContent ()
 
void RemovePdfaCompliance ()
 Remove pdfa compliance from the document More...
 
void RemovePdfUaCompliance ()
 Remove pdfUa compliance from the document More...
 
void SetTitle (System::String title)
 Set Title for Pdf Document More...
 
 Document (System::SharedPtr< System::IO::Stream > input)
 Initialize new Document instance from the input stream. More...
 
 Document (System::SharedPtr< System::IO::Stream > input, System::String password, bool isManagedStream)
 Initialize new Document instance from the input stream. More...
 
 Document (System::SharedPtr< System::IO::Stream > input, bool isManagedStream)
 Initialize new Document instance from the input stream. More...
 
 Document (System::String filename)
 Just init Document using filename . The same as Document(Stream). More...
 
void ProcessParagraphs ()
 Process paragraphs for generator. More...
 
void Save (System::SharedPtr< System::IO::Stream > output)
 Stores document into stream. More...
 
 Document (System::SharedPtr< System::IO::Stream > input, System::String password)
 Initialize new Document instance from the input stream. More...
 
void Save (System::String outputFileName)
 Saves document into the specified file. More...
 
void ExportAnnotationsToXfdf (System::String fileName)
 Exports all document annotations to XFDF file More...
 
void ExportAnnotationsToXfdf (System::SharedPtr< System::IO::Stream > stream)
 Export all document annotations into stream. More...
 
void SendTo (System::SharedPtr< Devices::DocumentDevice > device, System::SharedPtr< System::IO::Stream > output)
 Sends the whole document to the document device for processing. More...
 
void SendTo (System::SharedPtr< Devices::DocumentDevice > device, int32_t fromPage, int32_t toPage, System::SharedPtr< System::IO::Stream > output)
 Sends the certain pages of the document to the document device for processing. More...
 
void SendTo (System::SharedPtr< Devices::DocumentDevice > device, System::String outputFileName)
 Sends the whole document to the document device for processing. More...
 
void SendTo (System::SharedPtr< Devices::DocumentDevice > device, int32_t fromPage, int32_t toPage, System::String outputFileName)
 Sends the whole document to the document device for processing. More...
 
void RemoveMetadata ()
 Removes metadata from the document. More...
 
void ImportAnnotationsFromXfdf (System::String fileName)
 Imports annotations from XFDF file to document. More...
 
void ImportAnnotationsFromXfdf (System::SharedPtr< System::IO::Stream > stream)
 Imports annotations from stream to document. More...
 
bool Validate (System::String outputLogFileName, Aspose::Pdf::PdfFormat format)
 Validate document into the specified file. More...
 
bool Convert (System::String outputLogFileName, Aspose::Pdf::PdfFormat format, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)
 Convert document and save errors into the specified file. More...
 
bool Convert (System::SharedPtr< System::IO::Stream > outputLogStream, Aspose::Pdf::PdfFormat format, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)
 Convert document and save errors into the specified file. More...
 
bool Convert (System::String outputLogFileName, Aspose::Pdf::PdfFormat format, ConvertErrorAction action)
 Convert document and save errors into the specified file. More...
 
bool Convert (System::SharedPtr< PdfFormatConversionOptions > options)
 Convert document using specified conversion options More...
 
System::SharedPtr< System::IO::MemoryStreamConvertPageToPNGMemoryStream (System::SharedPtr< Page > page)
 Convert page to PNG for DSR, OMR , OCR More...
 
bool Validate (System::SharedPtr< System::IO::Stream > outputLogStream, Aspose::Pdf::PdfFormat format)
 Validate document into the specified file. More...
 
bool Validate (System::SharedPtr< PdfFormatConversionOptions > options)
 Validate document into the specified file. More...
 
bool Convert (Document::CallBackGetHocr callback)
 Convert document and save errors into the specified file. More...
 
bool Convert (System::SharedPtr< System::IO::Stream > outputLogStream, Aspose::Pdf::PdfFormat format, ConvertErrorAction action)
 Convert document and save errors into the specified stream. More...
 
 Document ()
 Initializes empty document. More...
 
 Document (System::String filename, System::SharedPtr< LoadOptions > options)
 Opens an existing document from a file providing necessary converting options to get pdf document. More...
 
 Document (System::SharedPtr< System::IO::Stream > input, System::SharedPtr< LoadOptions > options)
 Opens an existing document from a stream providing necessary converting to get pdf document. More...
 
void Flatten ()
 Removes all fields from the document and place their values instead. More...
 
void Flatten (System::SharedPtr< Aspose::Pdf::Forms::Form::FlattenSettings > flattenSettings)
 Removes all fields from the document and place their values instead. More...
 
void Encrypt (System::String userPassword, System::String ownerPassword, System::SharedPtr< Facades::DocumentPrivilege > privileges, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
 Encrypts the document. Call then Save to get encrypted version of the document. More...
 
void Encrypt (System::String userPassword, System::String ownerPassword, Aspose::Pdf::Permissions permissions, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm)
 Encrypts the document. Call then Save to get encrypted version of the document. More...
 
void Encrypt (System::String userPassword, System::String ownerPassword, Aspose::Pdf::Permissions permissions, Aspose::Pdf::CryptoAlgorithm cryptoAlgorithm, bool usePdf20)
 Encrypts the document. Call then Save to get encrypted version of the document. More...
 
void ChangePasswords (System::String ownerPassword, System::String newUserPassword, System::String newOwnerPassword)
 Changes document passwords. This action can be done only using owner password. More...
 
 Document (System::String filename, System::String password)
 Initializes new instance of the Document class for working with encrypted document. More...
 
 Document (System::String filename, System::String password, bool isManagedStream)
 Initializes new instance of the Document class for working with encrypted document. More...
 
void Decrypt ()
 Decrypts the document. Call then Save to obtain decrypted version of the document. More...
 
void Optimize ()
 Linearize document in order to More...
 
void Save ()
 Save document incrementally (i.e. using incremental update technque). More...
 
void Save (System::String outputFileName, SaveFormat format)
 Saves the document with a new name along with a file format. More...
 
void Save (System::SharedPtr< System::IO::Stream > outputStream, SaveFormat format)
 Saves the document with a new name along with a file format. More...
 
void Save (System::String outputFileName, System::SharedPtr< SaveOptions > options)
 Saves the document with a new name setting its save options. More...
 
void Save (System::SharedPtr< System::IO::Stream > outputStream, System::SharedPtr< SaveOptions > options)
 Saves the document to a stream with a save options. More...
 
void Save (System::SharedPtr< System::Web::HttpResponse > response, System::String outputFileName, ContentDisposition disposition, System::SharedPtr< SaveOptions > options)
 Saves the document to a response stream with a save options. More...
 
void Dispose ()
 Closes all resources used by this document. More...
 
void OptimizeResources ()
 Optimize resources in the document: More...
 
void OptimizeResources (System::SharedPtr< Aspose::Pdf::Optimization::OptimizationOptions > strategy)
 Optimize resources in the document according to defined optimization strategy. More...
 
System::SharedPtr< System::ObjectGetCatalogValue (System::String key)
 Returns item value from catalog dictionary. More...
 
void FreeMemory ()
 Clears memory More...
 
void SaveXml (System::String file)
 Save document to XML. More...
 
System::SharedPtr< System::ObjectGetObjectById (System::String id)
 Gets a object with specified ID in the document. More...
 
void BindXml (System::String file)
 Bind xml to document More...
 
void Repair ()
 Repairs broken document. More...
 
void BindXml (System::String xmlFile, System::String xslFile)
 Bind xml/xsl to document More...
 
void BindXml (System::SharedPtr< System::IO::Stream > xmlStream, System::SharedPtr< System::IO::Stream > xslStream)
 Bind xml/xsl to document More...
 
void BindXml (System::SharedPtr< System::IO::Stream > xmlStream, System::SharedPtr< System::IO::Stream > xslStream, System::SharedPtr< System::Xml::XmlReaderSettings > settings)
 Bind xml/xsl to document More...
 
void BindXml (System::SharedPtr< System::IO::Stream > stream)
 Bind xml to document More...
 
void GetXmpMetadata (System::SharedPtr< System::IO::Stream > stream)
 Get XMP metadata from document. More...
 
void SetXmpMetadata (System::SharedPtr< System::IO::Stream > stream)
 Set XMP metadata of document. More...
 
bool Check (bool doRepair)
 Validates document. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Static Public Member Functions

static bool get_IsLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
static void Convert (System::String srcFileName, System::SharedPtr< LoadOptions > loadOptions, System::String dstFileName, System::SharedPtr< SaveOptions > saveOptions)
 Converts source file in source format into destination file in destination format. More...
 
static void Convert (System::SharedPtr< System::IO::Stream > srcStream, System::SharedPtr< LoadOptions > loadOptions, System::String dstFileName, System::SharedPtr< SaveOptions > saveOptions)
 Converts stream in source format into destination file in destination format. More...
 
static void Convert (System::String srcFileName, System::SharedPtr< LoadOptions > loadOptions, System::SharedPtr< System::IO::Stream > dstStream, System::SharedPtr< SaveOptions > saveOptions)
 Converts source file in source format into stream in destination format. More...
 
static void Convert (System::SharedPtr< System::IO::Stream > srcStream, System::SharedPtr< LoadOptions > loadOptions, System::SharedPtr< System::IO::Stream > dstStream, System::SharedPtr< SaveOptions > saveOptions)
 Converts stream in source format into stream in destination format. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Public Attributes

System::Event< void(System::SharedPtr< Text::Font >, System::SharedPtr< Text::Font >)> FontSubstitution
 Occurs when font replaces another font in document. More...
 

Protected Member Functions

System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Rendering::ApsPage > > > get_ApsPages ()
 List of APS pages for the case of F1-to-F2 conversion when neither F1 nor F2 is PDF. More...
 
void set_ApsPages (System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Rendering::ApsPage >>> value)
 List of APS pages for the case of F1-to-F2 conversion when neither F1 nor F2 is PDF. More...
 
bool get__IsObjectLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
bool get_IsParagraphsAdded ()
 
void set_IsParagraphsAdded (bool value)
 
bool get_IsLayersAdded ()
 
void set_IsLayersAdded (bool value)
 
Text::TextEditOptions::FontReplace get_FontReplaceBehavior ()
 
void set_FontReplaceBehavior (Text::TextEditOptions::FontReplace value)
 
bool get_NotifyAboutFontSubstitutions ()
 
System::SharedPtr< Text::IFontSubstitutionRegistratorget_FontSubstitutionRegistrator ()
 
System::SharedPtr< Engine::CommonData::IDocumentSecondaryStrategiesget_DocumentStrategies ()
 
bool get_IsNotCheckMetadata ()
 Gets a metadata check for pdf/a(validation should pass this because it updates after on save). More...
 
bool get_IsConvertMetadataAndCatalogOnly ()
 Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true) More...
 
void set_IsConvertMetadataAndCatalogOnly (bool value)
 Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true) More...
 
int32_t get_ParentTreeNextKey ()
 
void set_ParentTreeNextKey (int32_t value)
 
System::SharedPtr< Copier > get_DefaultCopier ()
 Returns copier used for coping pages to this document. More...
 
bool get_IsConverted ()
 
void SetVentureLicense (System::SharedPtr< LicenseManagement::VentureLicense > license)
 
System::SharedPtr< LicenseManagement::VentureLicense > GetVentureLicense ()
 
void NotifyAboutSubstitution (System::SharedPtr< Aspose::Pdf::Text::Font > oldFont, System::SharedPtr< Aspose::Pdf::Text::Font > newFont)
 
void SetSimpleFontEncodingRule (HtmlSaveOptions::FontEncodingRules rule)
 
void ProcessLayers ()
 Process layers for generator. More...
 
void ValidateAnnotations ()
 
void UncompressObject (System::SharedPtr< Engine::Data::IPdfObject > obj)
 
void UpdatePagesResources ()
 Copies shared resources into pages. More...
 
void UpdateXFormResources ()
 Copies resources from Page into its XForm. More...
 
bool Convert (System::SharedPtr< System::Xml::XmlTextWriter > xml, Aspose::Pdf::PdfFormat format, bool onlyValidation, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)
 Convert the PDF Document and log results. More...
 
bool Convert (System::SharedPtr< System::Xml::XmlTextWriter > xml, Aspose::Pdf::PdfFormat format, bool onlyValidation, ConvertErrorAction action)
 Convert the PDF Document and log results. More...
 
bool Convert (System::SharedPtr< PdfFormatConversionOptions > options, bool onlyValidation)
 
void loadDocument (System::SharedPtr< System::IO::Stream > input, System::SharedPtr< LoadOptions > options)
 
void FlattenA ()
 
void FlattenB ()
 
bool IsCertified ()
 
System::SharedPtr< Engine::Data::Types::IPdfStreamAccessor > GetMetadataStream ()
 Returns raw metadata stream More...
 
void UpdatePages ()
 
void SuppressUpdate ()
 Suppresses update contents data for all pages The contents is not updated until ResumeUpdate is called More...
 
void ResumeUpdate ()
 resumes document update More...
 
System::SharedPtr< ResourcesGetResourcesFor (System::SharedPtr< Engine::Data::IPdfObject > obj)
 
void ReleaseResourcesFor (System::SharedPtr< Engine::Data::IPdfObject > obj)
 
void SetResourcesFor (System::SharedPtr< Engine::Data::IPdfObject > obj, System::SharedPtr< Resources > res)
 
System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, int32_t > > OptimizeResourceInternal (System::SharedPtr< Aspose::Pdf::Optimization::OptimizationOptions > strategy)
 
System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, int32_t > > OptimizeResourceInternal ()
 
void RegisterAfterImportAnnotation (System::SharedPtr< Annotations::Annotation > annotation)
 Register annotation for which AfterImport method must be called after import finished. More...
 
void AfterImport ()
 Enumerate all registered annotations and call AfterImport for each of them. More...
 
bool Check (bool doRepair, System::SharedPtr< System::IO::Stream > log)
 

Static Protected Member Functions

static bool get__IsLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
static bool get_Indivisible ()
 
static int32_t & IndivisibleLevel ()
 
static bool get___Indivisible ()
 
static bool Restricted (System::SharedPtr< Engine::Data::ITrailerable > tr, int32_t index)
 
static bool Restricted (System::SharedPtr< Document > doc, int32_t index)
 
static bool _NeedCheckRestrictions (System::SharedPtr< Document > doc)
 
static bool _Restricted (System::SharedPtr< Document > doc, int32_t index)
 
static void _Restrict (System::SharedPtr< Document > doc, int32_t index)
 
static void _Restrict (System::SharedPtr< Engine::Data::ITrailerable > tr, int32_t index)
 
static bool _Restricted (System::SharedPtr< Engine::Data::ITrailerable > tr, int32_t index)
 
static void Restrict (System::SharedPtr< Engine::Data::ITrailerable > tr, int32_t index)
 
static void Restrict (System::SharedPtr< Document > doc, int32_t index)
 
static void Restrict (System::SharedPtr< Engine::Data::ITrailerable > tr, System::SharedPtr< Collections::AsposeHashDictionary< System::String, System::SharedPtr< System::Object >>> cache)
 
static void Restrict (System::SharedPtr< Document > doc, System::SharedPtr< Collections::AsposeHashDictionary< System::String, System::SharedPtr< System::Object >>> cache)
 
template<typename TKey , typename TValue >
static void Restrict (System::SharedPtr< Document > doc, System::SharedPtr< System::Collections::Generic::Dictionary< TKey, TValue >> cache)
 
static bool IsVentureLicenseValid (System::SharedPtr< LicenseManagement::VentureLicense > _ventureLicense)
 
static bool Restricted (System::SharedPtr< LicenseManagement::VentureLicense > ventureLicense, int32_t index)
 
static void StartOperation ()
 
static void EndOperation ()
 
static void UpdateMetadata (System::SharedPtr< Engine::PdfDocument > document, System::SharedPtr< Aspose::Pdf::Metadata > metadata)
 
static void PreSave (System::SharedPtr< PageCollection > pages, System::SharedPtr< SaveOptions > saveOptions)
 
static System::SharedPtr< System::ObjectGetObjectById (System::String id, System::SharedPtr< Paragraphs > paragraphs)
 

Protected Attributes

bool IsPdfAConversionMode
 
System::SharedPtr< Engine::CommonData::Text::Fonts::Utilities::IDocumentFontSaveOptions > FontSaveOptions
 
System::SharedPtr< Engine::IPdfDocument > _engineDoc
 

Static Protected Attributes

static System::SharedPtr< System::ObjectsyncRoot
 

Detailed Description

Class representing PDF document

Member Typedef Documentation

◆ CallBackGetHocr

◆ FontSubstitutionHandler

Constructor & Destructor Documentation

◆ Document() [1/10]

Aspose::Pdf::Document::Document ( System::SharedPtr< System::IO::Stream input)

Initialize new Document instance from the input stream.

Parameters
inputStream with pdf document.

◆ Document() [2/10]

Aspose::Pdf::Document::Document ( System::SharedPtr< System::IO::Stream input,
System::String  password,
bool  isManagedStream 
)

Initialize new Document instance from the input stream.

Parameters
inputStream with pdf document.
passwordUser or owner password.
isManagedStreamif set to true inner stream is closed before exit; otherwise, is not.

◆ Document() [3/10]

Aspose::Pdf::Document::Document ( System::SharedPtr< System::IO::Stream input,
bool  isManagedStream 
)

Initialize new Document instance from the input stream.

Parameters
inputStream with pdf document.
isManagedStreamif set to true inner stream is closed before exit; otherwise, is not.

◆ Document() [4/10]

Aspose::Pdf::Document::Document ( System::String  filename)

Just init Document using filename . The same as Document(Stream).

Parameters
filenameThe name of the pdf document file.

◆ Document() [5/10]

Aspose::Pdf::Document::Document ( System::SharedPtr< System::IO::Stream input,
System::String  password 
)

Initialize new Document instance from the input stream.

Parameters
inputInput stream object, corresponding pdf is password protected.
passwordUser or owner password.

◆ Document() [6/10]

Aspose::Pdf::Document::Document ( )

Initializes empty document.

◆ Document() [7/10]

Aspose::Pdf::Document::Document ( System::String  filename,
System::SharedPtr< LoadOptions options 
)

Opens an existing document from a file providing necessary converting options to get pdf document.

Parameters
filenameInput file to convert into pdf document.
optionsRepresents properties for converting filename into pdf document.

◆ Document() [8/10]

Aspose::Pdf::Document::Document ( System::SharedPtr< System::IO::Stream input,
System::SharedPtr< LoadOptions options 
)

Opens an existing document from a stream providing necessary converting to get pdf document.

Parameters
inputInput stream to convert into pdf document.
optionsRepresents properties for converting input into pdf document.

◆ Document() [9/10]

Aspose::Pdf::Document::Document ( System::String  filename,
System::String  password 
)

Initializes new instance of the Document class for working with encrypted document.

Parameters
filenameDocument file name.
passwordUser or owner password.

◆ Document() [10/10]

Aspose::Pdf::Document::Document ( System::String  filename,
System::String  password,
bool  isManagedStream 
)

Initializes new instance of the Document class for working with encrypted document.

Parameters
filenameDocument file name.
passwordUser or owner password.
isManagedStreamif set to true inner stream is closed before exit; otherwise, is not.

Member Function Documentation

◆ _NeedCheckRestrictions()

static bool Aspose::Pdf::Document::_NeedCheckRestrictions ( System::SharedPtr< Document doc)
staticprotected

◆ _Restrict() [1/2]

static void Aspose::Pdf::Document::_Restrict ( System::SharedPtr< Document doc,
int32_t  index 
)
staticprotected

◆ _Restrict() [2/2]

static void Aspose::Pdf::Document::_Restrict ( System::SharedPtr< Engine::Data::ITrailerable >  tr,
int32_t  index 
)
staticprotected

◆ _Restricted() [1/2]

static bool Aspose::Pdf::Document::_Restricted ( System::SharedPtr< Document doc,
int32_t  index 
)
staticprotected

◆ _Restricted() [2/2]

static bool Aspose::Pdf::Document::_Restricted ( System::SharedPtr< Engine::Data::ITrailerable >  tr,
int32_t  index 
)
staticprotected

◆ AfterImport()

void Aspose::Pdf::Document::AfterImport ( )
protected

Enumerate all registered annotations and call AfterImport for each of them.

◆ BindXml() [1/5]

void Aspose::Pdf::Document::BindXml ( System::String  file)

Bind xml to document

Parameters
fileThe xml file

◆ BindXml() [2/5]

void Aspose::Pdf::Document::BindXml ( System::String  xmlFile,
System::String  xslFile 
)

Bind xml/xsl to document

Parameters
xmlFileThe xml file.
xslFileThe xsl file if XSLT is used.

◆ BindXml() [3/5]

void Aspose::Pdf::Document::BindXml ( System::SharedPtr< System::IO::Stream xmlStream,
System::SharedPtr< System::IO::Stream xslStream 
)

Bind xml/xsl to document

Parameters
xmlStreamThe xml stream.
xslStreamThe xsl stream if XSLT is used.

◆ BindXml() [4/5]

void Aspose::Pdf::Document::BindXml ( System::SharedPtr< System::IO::Stream xmlStream,
System::SharedPtr< System::IO::Stream xslStream,
System::SharedPtr< System::Xml::XmlReaderSettings settings 
)

Bind xml/xsl to document

Parameters
xmlStreamThe xml stream.
xslStreamThe xsl stream if XSLT is used.
settingsThe xml reader settings.

◆ BindXml() [5/5]

void Aspose::Pdf::Document::BindXml ( System::SharedPtr< System::IO::Stream stream)

Bind xml to document

Parameters
streamThe xml stream.

◆ ChangePasswords()

void Aspose::Pdf::Document::ChangePasswords ( System::String  ownerPassword,
System::String  newUserPassword,
System::String  newOwnerPassword 
)

Changes document passwords. This action can be done only using owner password.

Parameters
ownerPasswordOwner password.
newUserPasswordNew user password.
newOwnerPasswordNew owner password.

◆ Check() [1/2]

bool Aspose::Pdf::Document::Check ( bool  doRepair)

Validates document.

Parameters
doRepairIf true found issues will be repaired.
Returns

◆ Check() [2/2]

bool Aspose::Pdf::Document::Check ( bool  doRepair,
System::SharedPtr< System::IO::Stream log 
)
protected

◆ Convert() [1/13]

bool Aspose::Pdf::Document::Convert ( System::String  outputLogFileName,
Aspose::Pdf::PdfFormat  format,
ConvertErrorAction  action,
ConvertTransparencyAction  transparencyAction 
)

Convert document and save errors into the specified file.

Parameters
outputLogFileNamePath to file where the comments will be stored.
formatThe pdf format.
actionAction for objects that can not be converted
transparencyActionAction for image masked objects
Returns
The operation result

◆ Convert() [2/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< System::IO::Stream outputLogStream,
Aspose::Pdf::PdfFormat  format,
ConvertErrorAction  action,
ConvertTransparencyAction  transparencyAction 
)

Convert document and save errors into the specified file.

Parameters
outputLogStreamStream where the comments will be stored.
formatThe pdf format.
actionAction for objects that can not be converted
transparencyActionAction for image masked objects
Returns
The operation result

◆ Convert() [3/13]

bool Aspose::Pdf::Document::Convert ( System::String  outputLogFileName,
Aspose::Pdf::PdfFormat  format,
ConvertErrorAction  action 
)

Convert document and save errors into the specified file.

Parameters
outputLogFileNamePath to file where the comments will be stored.
formatThe pdf format.
actionAction for objects that can not be converted
Returns
The operation result

◆ Convert() [4/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< PdfFormatConversionOptions options)

Convert document using specified conversion options

Parameters
optionsset of options for convert PDF document
Returns
The operation result

◆ Convert() [5/13]

bool Aspose::Pdf::Document::Convert ( Document::CallBackGetHocr  callback)

Convert document and save errors into the specified file.

Parameters
callbackAction for objects that can not be converted
Returns
The operation result

◆ Convert() [6/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< System::IO::Stream outputLogStream,
Aspose::Pdf::PdfFormat  format,
ConvertErrorAction  action 
)

Convert document and save errors into the specified stream.

Parameters
outputLogStreamStream where the comments will be stored.
formatPdf format.
actionAction for objects that can not be converted
Returns
The operation result

◆ Convert() [7/13]

static void Aspose::Pdf::Document::Convert ( System::String  srcFileName,
System::SharedPtr< LoadOptions loadOptions,
System::String  dstFileName,
System::SharedPtr< SaveOptions saveOptions 
)
static

Converts source file in source format into destination file in destination format.

Parameters
srcFileNameThe source file name.
loadOptionsThe source file format.
dstFileNameThe destination file name.
saveOptionsThe destination file format.

◆ Convert() [8/13]

static void Aspose::Pdf::Document::Convert ( System::SharedPtr< System::IO::Stream srcStream,
System::SharedPtr< LoadOptions loadOptions,
System::String  dstFileName,
System::SharedPtr< SaveOptions saveOptions 
)
static

Converts stream in source format into destination file in destination format.

Parameters
srcStreamThe source stream.
loadOptionsThe source stream format.
dstFileNameThe destination file name.
saveOptionsThe destination file format.

◆ Convert() [9/13]

static void Aspose::Pdf::Document::Convert ( System::String  srcFileName,
System::SharedPtr< LoadOptions loadOptions,
System::SharedPtr< System::IO::Stream dstStream,
System::SharedPtr< SaveOptions saveOptions 
)
static

Converts source file in source format into stream in destination format.

Parameters
srcFileNameThe source file name.
loadOptionsThe source file format.
dstStreamThe destination stream.
saveOptionsThe destination stream format.

◆ Convert() [10/13]

static void Aspose::Pdf::Document::Convert ( System::SharedPtr< System::IO::Stream srcStream,
System::SharedPtr< LoadOptions loadOptions,
System::SharedPtr< System::IO::Stream dstStream,
System::SharedPtr< SaveOptions saveOptions 
)
static

Converts stream in source format into stream in destination format.

Parameters
srcStreamThe source stream.
loadOptionsThe source stream format.
dstStreamThe destination stream.
saveOptionsThe destination file format.

◆ Convert() [11/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< System::Xml::XmlTextWriter xml,
Aspose::Pdf::PdfFormat  format,
bool  onlyValidation,
ConvertErrorAction  action,
ConvertTransparencyAction  transparencyAction 
)
protected

Convert the PDF Document and log results.

Parameters
xmlThe log.
formatPdf format.
onlyValidationOnly document validation.
actionAction for objects that can not be converted
transparencyActionAction for image masked objects
Returns
The operation result

◆ Convert() [12/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< System::Xml::XmlTextWriter xml,
Aspose::Pdf::PdfFormat  format,
bool  onlyValidation,
ConvertErrorAction  action 
)
protected

Convert the PDF Document and log results.

Parameters
xmlThe log.
formatPdf format.
onlyValidationOnly document validation.
actionAction for objects that can not be converted
Returns
The operation result

◆ Convert() [13/13]

bool Aspose::Pdf::Document::Convert ( System::SharedPtr< PdfFormatConversionOptions options,
bool  onlyValidation 
)
protected

◆ ConvertPageToPNGMemoryStream()

System::SharedPtr<System::IO::MemoryStream> Aspose::Pdf::Document::ConvertPageToPNGMemoryStream ( System::SharedPtr< Page page)

Convert page to PNG for DSR, OMR , OCR

Parameters
page
Returns

◆ Decrypt()

void Aspose::Pdf::Document::Decrypt ( )

Decrypts the document. Call then Save to obtain decrypted version of the document.

◆ Dispose()

void Aspose::Pdf::Document::Dispose ( )
virtual

Closes all resources used by this document.

Reimplemented from System::IDisposable.

◆ Encrypt() [1/3]

void Aspose::Pdf::Document::Encrypt ( System::String  userPassword,
System::String  ownerPassword,
System::SharedPtr< Facades::DocumentPrivilege privileges,
Aspose::Pdf::CryptoAlgorithm  cryptoAlgorithm,
bool  usePdf20 
)

Encrypts the document. Call then Save to get encrypted version of the document.

Parameters
userPasswordUser password.
ownerPasswordOwner password.
privilegesDocument permissions, see Permissions for details.
cryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.
usePdf20Support for revision 6 (Extension 8).

◆ Encrypt() [2/3]

void Aspose::Pdf::Document::Encrypt ( System::String  userPassword,
System::String  ownerPassword,
Aspose::Pdf::Permissions  permissions,
Aspose::Pdf::CryptoAlgorithm  cryptoAlgorithm 
)

Encrypts the document. Call then Save to get encrypted version of the document.

Parameters
userPasswordUser password.
ownerPasswordOwner password.
permissionsDocument permissions, see Permissions for details.
cryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.

◆ Encrypt() [3/3]

void Aspose::Pdf::Document::Encrypt ( System::String  userPassword,
System::String  ownerPassword,
Aspose::Pdf::Permissions  permissions,
Aspose::Pdf::CryptoAlgorithm  cryptoAlgorithm,
bool  usePdf20 
)

Encrypts the document. Call then Save to get encrypted version of the document.

Parameters
userPasswordUser password.
ownerPasswordOwner password.
permissionsDocument permissions, see Permissions for details.
cryptoAlgorithmCryptographic algorithm, see CryptoAlgorithm for details.
usePdf20Support for revision 6 (Extension 8).

◆ EndOperation()

static void Aspose::Pdf::Document::EndOperation ( )
staticprotected

◆ ExportAnnotationsToXfdf() [1/2]

void Aspose::Pdf::Document::ExportAnnotationsToXfdf ( System::String  fileName)

Exports all document annotations to XFDF file

Parameters
fileNameXFDF file name

◆ ExportAnnotationsToXfdf() [2/2]

void Aspose::Pdf::Document::ExportAnnotationsToXfdf ( System::SharedPtr< System::IO::Stream stream)

Export all document annotations into stream.

Parameters
streamStream where store XFDF.

◆ Flatten() [1/2]

void Aspose::Pdf::Document::Flatten ( )

Removes all fields from the document and place their values instead.

◆ Flatten() [2/2]

void Aspose::Pdf::Document::Flatten ( System::SharedPtr< Aspose::Pdf::Forms::Form::FlattenSettings flattenSettings)

Removes all fields from the document and place their values instead.

Parameters
flattenSettingsSettings for flattening process.

◆ FlattenA()

void Aspose::Pdf::Document::FlattenA ( )
protected

◆ FlattenB()

void Aspose::Pdf::Document::FlattenB ( )
protected

◆ FreeMemory()

void Aspose::Pdf::Document::FreeMemory ( )
virtual

Clears memory

Implements Aspose::Pdf::ISupportsMemoryCleanup.

◆ get___Indivisible()

static bool Aspose::Pdf::Document::get___Indivisible ( )
staticprotected

◆ get__IsLicensed()

static bool Aspose::Pdf::Document::get__IsLicensed ( )
staticprotected

Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise.

◆ get__IsObjectLicensed()

bool Aspose::Pdf::Document::get__IsObjectLicensed ( )
protected

Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise.

◆ get_Actions()

System::SharedPtr<Annotations::DocumentActionCollection> Aspose::Pdf::Document::get_Actions ( )

Gets document actions. This property is instance of DocumentActions class which allows to get/set BeforClosing, BeforSaving, etc. actions.

This example demonstrates how to obtain after open action of the document:

Aspose.Pdf.Document document = new Aspose.Pdf.Document("d:\\work\\aspose\\aspose.pdf.kit.net.new\\trunk\\testdata\\Aspose.Pdf\\PdfWithOpenAction.pdf");
Aspose.Pdf.Annotations.DocumentActionCollection actions = document.Actions;
Aspose.Pdf.Annotations.PdfAction afterSavingAction = actions.AfterSaving;

◆ get_AllowReusePageContent()

bool Aspose::Pdf::Document::get_AllowReusePageContent ( )

Allows to merge page contents to optimize docuement size. If used then differnet but duplicated pages may reference to the same content object. Please note that this mode may cause side effects like changing page content when other page is changed.

◆ get_ApsPages()

System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Rendering::ApsPage> > > Aspose::Pdf::Document::get_ApsPages ( )
protected

List of APS pages for the case of F1-to-F2 conversion when neither F1 nor F2 is PDF.

◆ get_Background()

System::SharedPtr<Color> Aspose::Pdf::Document::get_Background ( )

Gets the background color of the document.

◆ get_CenterWindow()

bool Aspose::Pdf::Document::get_CenterWindow ( )

Gets flag specifying whether position of the document's window will be centerd on the screen.

Example demonstrates how to get CenterWindow flag:

Document document = new Document("sample.pdf");
bool value = document.CenterWindow;

◆ get_Collection()

System::SharedPtr<Aspose::Pdf::Collection> Aspose::Pdf::Document::get_Collection ( )

Gets collection of document.

◆ get_CryptoAlgorithm()

System::Nullable<Aspose::Pdf::CryptoAlgorithm> Aspose::Pdf::Document::get_CryptoAlgorithm ( )

Gets security settings if document is encrypted. If document is not encrypted then corresponding exception will be raised in .net 1.1 or CryptoAlgorithm will be null for other .net versions.

◆ get_DefaultCopier()

System::SharedPtr<Copier> Aspose::Pdf::Document::get_DefaultCopier ( )
protected

Returns copier used for coping pages to this document.

◆ get_Destinations()

System::SharedPtr<DestinationCollection> Aspose::Pdf::Document::get_Destinations ( )

Gets the collection of destinations. Obsolete. Please use NamedDestinations.

◆ get_Direction()

Aspose::Pdf::Direction Aspose::Pdf::Document::get_Direction ( )

Gets reading order of text: L2R (left to right) or R2L (right to left).

◆ get_DisplayDocTitle()

bool Aspose::Pdf::Document::get_DisplayDocTitle ( )

Gets flag specifying whether document's window title bar should display document title.

Example demonstrates how to get DisplayDocTitle flag:

Document document = new Document("sample.pdf");
bool value = document.DisplayDocTitle;

◆ get_DocumentStrategies()

System::SharedPtr<Engine::CommonData::IDocumentSecondaryStrategies> Aspose::Pdf::Document::get_DocumentStrategies ( )
protected

◆ get_Duplex()

PrintDuplex Aspose::Pdf::Document::get_Duplex ( )

Gets print duplex mode handling option to use when printing the file from the print dialog.

◆ get_EmbeddedFiles()

System::SharedPtr<EmbeddedFileCollection> Aspose::Pdf::Document::get_EmbeddedFiles ( )

Gets collection of files embedded to document.

◆ get_EmbedStandardFonts()

bool Aspose::Pdf::Document::get_EmbedStandardFonts ( )

Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false.

◆ get_EnableObjectUnload()

bool Aspose::Pdf::Document::get_EnableObjectUnload ( )

Get or sets flag which enables document partially be unloaded from memory. This allow to decrease memory usage but may have negative effect on perofmance.

◆ get_FileName()

System::String Aspose::Pdf::Document::get_FileName ( )

Name of the PDF file that caused this document

◆ get_FitWindow()

bool Aspose::Pdf::Document::get_FitWindow ( )

Gets flag specifying whether document window must be resized to fit the first displayed page.

Example demonstrates how to get FitWindow flag:

Document document = new Document("sample.pdf");
bool value = document.FitWindow;

◆ get_FontReplaceBehavior()

Text::TextEditOptions::FontReplace Aspose::Pdf::Document::get_FontReplaceBehavior ( )
protected

◆ get_FontSubstitutionRegistrator()

System::SharedPtr<Text::IFontSubstitutionRegistrator> Aspose::Pdf::Document::get_FontSubstitutionRegistrator ( )
protected

◆ get_FontUtilities()

System::SharedPtr<Document::IDocumentFontUtilities> Aspose::Pdf::Document::get_FontUtilities ( )

◆ get_Form()

System::SharedPtr<Aspose::Pdf::Forms::Form> Aspose::Pdf::Document::get_Form ( )

Gets Acro Form of the document.

◆ get_HideMenubar()

bool Aspose::Pdf::Document::get_HideMenubar ( )

Gets flag specifying whether menu bar should be hidden when document is active.

Example demonstrates how to get HideMenubar flag:

Document document = new Document("sample.pdf");
bool value = document.HideMenubar;

◆ get_HideToolBar()

bool Aspose::Pdf::Document::get_HideToolBar ( )

Gets flag specifying whether toolbar should be hidden when document is active.

Example demonstrates how to get HideToolBar flag:

Document document = new Document("sample.pdf");
bool value = document.HideToolBar;

◆ get_HideWindowUI()

bool Aspose::Pdf::Document::get_HideWindowUI ( )

Gets flag specifying whether user interface elements should be hidden when document is active.

Example demonstrates how to get HideWindowUI flag:

Document document = new Document("sample.pdf");
bool value = document.HideWindowUI;

◆ get_Id()

System::SharedPtr<Aspose::Pdf::Id> Aspose::Pdf::Document::get_Id ( )

Gets the ID.

◆ get_IgnoreCorruptedObjects()

bool Aspose::Pdf::Document::get_IgnoreCorruptedObjects ( )

Gets flag of ignoring errors in source files. When pages from source document copied into destination document, copying process is stopped with exception if some objects in source files are corrupted when this flag is false. example: dest.Pages.Add(src.Pages); If this flag is set to true then corrupted objects will be replaced with empty values. By default: true.

◆ get_Indivisible()

static bool Aspose::Pdf::Document::get_Indivisible ( )
staticprotected

◆ get_Info()

System::SharedPtr<DocumentInfo> Aspose::Pdf::Document::get_Info ( )

Gets document info.

◆ get_IsConverted()

bool Aspose::Pdf::Document::get_IsConverted ( )
protected

◆ get_IsConvertMetadataAndCatalogOnly()

bool Aspose::Pdf::Document::get_IsConvertMetadataAndCatalogOnly ( )
protected

Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true)

◆ get_IsEncrypted()

bool Aspose::Pdf::Document::get_IsEncrypted ( )

Gets encrypted status of the document. True if document is encrypted.

◆ get_IsLayersAdded()

bool Aspose::Pdf::Document::get_IsLayersAdded ( )
protected

◆ get_IsLicensed()

static bool Aspose::Pdf::Document::get_IsLicensed ( )
static

Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise.

◆ get_IsLinearized()

bool Aspose::Pdf::Document::get_IsLinearized ( )

Gets a value indicating whether document is linearized.

◆ get_IsNotCheckMetadata()

bool Aspose::Pdf::Document::get_IsNotCheckMetadata ( )
protected

Gets a metadata check for pdf/a(validation should pass this because it updates after on save).

◆ get_IsParagraphsAdded()

bool Aspose::Pdf::Document::get_IsParagraphsAdded ( )
protected

◆ get_IsPdfaCompliant()

bool Aspose::Pdf::Document::get_IsPdfaCompliant ( )

Gets the is document pdfa compliant.

◆ get_IsPdfUaCompliant()

bool Aspose::Pdf::Document::get_IsPdfUaCompliant ( )

Gets the is document pdfua compliant.

◆ get_IsXrefGapsAllowed()

bool Aspose::Pdf::Document::get_IsXrefGapsAllowed ( )

Gets the is document pdfa compliant.

◆ get_JavaScript()

System::SharedPtr<JavaScriptCollection> Aspose::Pdf::Document::get_JavaScript ( )

Collection of JavaScript of document level.

◆ get_LogicalStructure()

System::SharedPtr<Structure::RootElement> Aspose::Pdf::Document::get_LogicalStructure ( )

Gets logical structure of the document.

◆ get_Metadata()

System::SharedPtr<Aspose::Pdf::Metadata> Aspose::Pdf::Document::get_Metadata ( )

Document metadata. (A PDF document may include general information, such as the document's title, author, and creation and modification dates. Such global information about the document (as opposed to its content or structure) is called metadata and is intended to assist in cataloguing and searching for documents in external databases.)

◆ get_NamedDestinations()

System::SharedPtr<NamedDestinationCollection> Aspose::Pdf::Document::get_NamedDestinations ( )

Collection of Named Destination in the document.

◆ get_NonFullScreenPageMode()

Aspose::Pdf::PageMode Aspose::Pdf::Document::get_NonFullScreenPageMode ( )

Gets page mode, specifying how to display the document on exiting full-screen mode.

◆ get_NotifyAboutFontSubstitutions()

bool Aspose::Pdf::Document::get_NotifyAboutFontSubstitutions ( )
protected

◆ get_OpenAction()

System::SharedPtr<Annotations::IAppointment> Aspose::Pdf::Document::get_OpenAction ( )

Gets action performed at document opening.

Example demonstrates how to get CenterWindow flag:

Document document = new Document("sample.pdf");
IAppointment value = document.OpenAction;

◆ get_OptimizeSize()

bool Aspose::Pdf::Document::get_OptimizeSize ( )

Gets optimization flag. When pages are added to document, equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.

◆ get_Outlines()

System::SharedPtr<OutlineCollection> Aspose::Pdf::Document::get_Outlines ( )

Gets document outlines.

◆ get_PageInfo()

System::SharedPtr<Aspose::Pdf::PageInfo> Aspose::Pdf::Document::get_PageInfo ( )

Gets the page info.(for generator only)

The page info.

◆ get_PageLabels()

System::SharedPtr<PageLabelCollection> Aspose::Pdf::Document::get_PageLabels ( )

Gets page labels in the document.

◆ get_PageLayout()

Aspose::Pdf::PageLayout Aspose::Pdf::Document::get_PageLayout ( )

Gets page layout which shall be used when the document is opened.

◆ get_PageMode()

Aspose::Pdf::PageMode Aspose::Pdf::Document::get_PageMode ( )

Gets page mode, specifying how document should be displayed when opened.

◆ get_Pages()

System::SharedPtr<PageCollection> Aspose::Pdf::Document::get_Pages ( )

Gets collection of document pages. Note that pages are numbered from 1 in collection.

Example below demonstrates how to operate with the document pages: How to obtain number of pages and how to obtain rectangle of starting page of the document.

Aspose.Pdf.Document document = new Aspose.Pdf.Document("sample.pdf");
Aspose.Pdf.PageCollection pages = document.Pages;
System.Console.WriteLine("Document contains " + pages.Count);
Page page = pages[1];
Rectangle rect = page.Rect;

◆ get_ParentTreeNextKey()

int32_t Aspose::Pdf::Document::get_ParentTreeNextKey ( )
protected

◆ get_PdfFormat()

Aspose::Pdf::PdfFormat Aspose::Pdf::Document::get_PdfFormat ( )

Gets PDF format

◆ get_Permissions()

int32_t Aspose::Pdf::Document::get_Permissions ( )

Gets permissions of the document.

◆ get_TaggedContent()

System::SharedPtr<Tagged::ITaggedContent> Aspose::Pdf::Document::get_TaggedContent ( )

Gets access to TaggedPdf content.

The example demonstrates how to use tagged content for creating new document with header, paragraphs and images.

// Create new document
Document document = new Document();
// Get the tagged content
ITaggedContent taggedContent = document.TaggedContent;
// Set language for document
taggedContent.SetLanguage("en-US");
// Set title for PDF document
taggedContent.SetTitle("Example document");
// Creating and adding Section
SectElement sect = taggedContent.CreateSectElement();
taggedContent.RootElement.AppendChild(sect);
// Create Header
HeaderElement h1 = taggedContent.CreateHeaderElement(1);
h1.SetText("The Header");
sect.AppendChild(h1);
// Create paragraph
ParagraphElement p = taggedContent.CreateParagraphElement();
p.SetTag("Paragraph");
p.SetText("The text of paragraph.");
sect.AppendChild(p);
// Create illustration
IllustrationElement figure1 = taggedContent.CreateFigureElement();
sect.AppendChild(figure1);
figure1.AlternativeText = "Figure 1";
figure1.Title = "Image 1";
figure1.SetTag("Fig");
figure1.SetImage("path/of/image.jpg");
// Save document
document.Save("example.pdf");

◆ get_Version()

System::String Aspose::Pdf::Document::get_Version ( )

Gets a version of Pdf from Pdf file header.

◆ GetCatalogValue()

System::SharedPtr<System::Object> Aspose::Pdf::Document::GetCatalogValue ( System::String  key)

Returns item value from catalog dictionary.

Parameters
keyThe key of item.
Returns
Item value - if key was successfully found; otherwise, null.

◆ GetMetadataStream()

System::SharedPtr<Engine::Data::Types::IPdfStreamAccessor> Aspose::Pdf::Document::GetMetadataStream ( )
protected

Returns raw metadata stream

Returns

◆ GetObjectById() [1/2]

System::SharedPtr<System::Object> Aspose::Pdf::Document::GetObjectById ( System::String  id)

Gets a object with specified ID in the document.

Parameters
idThe object id.
Returns
The object with specified id. Null if the id is not found.

◆ GetObjectById() [2/2]

static System::SharedPtr<System::Object> Aspose::Pdf::Document::GetObjectById ( System::String  id,
System::SharedPtr< Paragraphs paragraphs 
)
staticprotected

◆ GetResourcesFor()

System::SharedPtr<Resources> Aspose::Pdf::Document::GetResourcesFor ( System::SharedPtr< Engine::Data::IPdfObject >  obj)
protected

◆ GetVentureLicense()

System::SharedPtr<LicenseManagement::VentureLicense> Aspose::Pdf::Document::GetVentureLicense ( )
protected

◆ GetXmpMetadata()

void Aspose::Pdf::Document::GetXmpMetadata ( System::SharedPtr< System::IO::Stream stream)

Get XMP metadata from document.

Parameters
streamStream where metadata will be stored.

◆ ImportAnnotationsFromXfdf() [1/2]

void Aspose::Pdf::Document::ImportAnnotationsFromXfdf ( System::String  fileName)

Imports annotations from XFDF file to document.

Parameters
fileNameXFDF file name

◆ ImportAnnotationsFromXfdf() [2/2]

void Aspose::Pdf::Document::ImportAnnotationsFromXfdf ( System::SharedPtr< System::IO::Stream stream)

Imports annotations from stream to document.

Parameters
streamStream contains XFDF data.

◆ IndivisibleLevel()

static int32_t& Aspose::Pdf::Document::IndivisibleLevel ( )
staticprotected

◆ IsCertified()

bool Aspose::Pdf::Document::IsCertified ( )
protected

◆ IsVentureLicenseValid()

static bool Aspose::Pdf::Document::IsVentureLicenseValid ( System::SharedPtr< LicenseManagement::VentureLicense >  _ventureLicense)
staticprotected

◆ loadDocument()

void Aspose::Pdf::Document::loadDocument ( System::SharedPtr< System::IO::Stream input,
System::SharedPtr< LoadOptions options 
)
protected

◆ NotifyAboutSubstitution()

void Aspose::Pdf::Document::NotifyAboutSubstitution ( System::SharedPtr< Aspose::Pdf::Text::Font oldFont,
System::SharedPtr< Aspose::Pdf::Text::Font newFont 
)
protected

◆ Optimize()

void Aspose::Pdf::Document::Optimize ( )

Linearize document in order to

  • open the first page as quickly as possible;
  • display next page or follow by link to the next page as quickly as possible;
  • display the page incrementally as it arrives when data for a page is delivered over a slow channel (display the most useful data first);
  • permit user interaction, such as following a link, to be performed even before the entire page has been received and displayed. Invoking this method doesn't actually saves the document. On the contrary the document only is prepared to have optimized structure, call then Save to get optimized document.

◆ OptimizeResourceInternal() [1/2]

System::SharedPtr<System::Collections::Generic::Dictionary<int32_t, int32_t> > Aspose::Pdf::Document::OptimizeResourceInternal ( System::SharedPtr< Aspose::Pdf::Optimization::OptimizationOptions strategy)
protected

◆ OptimizeResourceInternal() [2/2]

System::SharedPtr<System::Collections::Generic::Dictionary<int32_t, int32_t> > Aspose::Pdf::Document::OptimizeResourceInternal ( )
protected

◆ OptimizeResources() [1/2]

void Aspose::Pdf::Document::OptimizeResources ( )

Optimize resources in the document:

  1. Resources which are not used on the document pages are removed;
  2. Equal resources are joined into one object;
  3. Unused objects are deleted.

◆ OptimizeResources() [2/2]

void Aspose::Pdf::Document::OptimizeResources ( System::SharedPtr< Aspose::Pdf::Optimization::OptimizationOptions strategy)

Optimize resources in the document according to defined optimization strategy.

Parameters
strategyOptimization strategy.

◆ PreSave()

static void Aspose::Pdf::Document::PreSave ( System::SharedPtr< PageCollection pages,
System::SharedPtr< SaveOptions saveOptions 
)
staticprotected

◆ ProcessLayers()

void Aspose::Pdf::Document::ProcessLayers ( )
protected

Process layers for generator.

◆ ProcessParagraphs()

void Aspose::Pdf::Document::ProcessParagraphs ( )

Process paragraphs for generator.

◆ RegisterAfterImportAnnotation()

void Aspose::Pdf::Document::RegisterAfterImportAnnotation ( System::SharedPtr< Annotations::Annotation annotation)
protected

Register annotation for which AfterImport method must be called after import finished.

Parameters
annotation

◆ ReleaseResourcesFor()

void Aspose::Pdf::Document::ReleaseResourcesFor ( System::SharedPtr< Engine::Data::IPdfObject >  obj)
protected

◆ RemoveMetadata()

void Aspose::Pdf::Document::RemoveMetadata ( )

Removes metadata from the document.

◆ RemovePdfaCompliance()

void Aspose::Pdf::Document::RemovePdfaCompliance ( )

Remove pdfa compliance from the document

◆ RemovePdfUaCompliance()

void Aspose::Pdf::Document::RemovePdfUaCompliance ( )

Remove pdfUa compliance from the document

◆ Repair()

void Aspose::Pdf::Document::Repair ( )

Repairs broken document.

◆ Restrict() [1/5]

static void Aspose::Pdf::Document::Restrict ( System::SharedPtr< Engine::Data::ITrailerable >  tr,
int32_t  index 
)
staticprotected

◆ Restrict() [2/5]

static void Aspose::Pdf::Document::Restrict ( System::SharedPtr< Document doc,
int32_t  index 
)
staticprotected

◆ Restrict() [3/5]

static void Aspose::Pdf::Document::Restrict ( System::SharedPtr< Engine::Data::ITrailerable >  tr,
System::SharedPtr< Collections::AsposeHashDictionary< System::String, System::SharedPtr< System::Object >>>  cache 
)
staticprotected

◆ Restrict() [4/5]

static void Aspose::Pdf::Document::Restrict ( System::SharedPtr< Document doc,
System::SharedPtr< Collections::AsposeHashDictionary< System::String, System::SharedPtr< System::Object >>>  cache 
)
staticprotected

◆ Restrict() [5/5]

template<typename TKey , typename TValue >
static void Aspose::Pdf::Document::Restrict ( System::SharedPtr< Document doc,
System::SharedPtr< System::Collections::Generic::Dictionary< TKey, TValue >>  cache 
)
inlinestaticprotected

◆ Restricted() [1/3]

static bool Aspose::Pdf::Document::Restricted ( System::SharedPtr< Engine::Data::ITrailerable >  tr,
int32_t  index 
)
staticprotected

◆ Restricted() [2/3]

static bool Aspose::Pdf::Document::Restricted ( System::SharedPtr< Document doc,
int32_t  index 
)
staticprotected

◆ Restricted() [3/3]

static bool Aspose::Pdf::Document::Restricted ( System::SharedPtr< LicenseManagement::VentureLicense >  ventureLicense,
int32_t  index 
)
staticprotected

◆ ResumeUpdate()

void Aspose::Pdf::Document::ResumeUpdate ( )
protected

resumes document update

◆ Save() [1/8]

void Aspose::Pdf::Document::Save ( System::SharedPtr< System::IO::Stream output)

Stores document into stream.

Parameters
outputStream where document shell be stored.

◆ Save() [2/8]

void Aspose::Pdf::Document::Save ( System::String  outputFileName)

Saves document into the specified file.

Parameters
outputFileNamePath to file where the document will be stored.

◆ Save() [3/8]

void Aspose::Pdf::Document::Save ( )

Save document incrementally (i.e. using incremental update technque).

In order to save document incremetally we should open the document file for writing. Therefore Document must be initialized with writable stream like in the next code snippet: Document doc = new Document(new FileStream("document.pdf", FileMode.Open, FileAccess.ReadWrite)); // make some changes and save the document incrementally doc.Save();

◆ Save() [4/8]

void Aspose::Pdf::Document::Save ( System::String  outputFileName,
SaveFormat  format 
)

Saves the document with a new name along with a file format.

Parameters
outputFileNamePath to file where the document will be stored.
formatFormat options.

◆ Save() [5/8]

void Aspose::Pdf::Document::Save ( System::SharedPtr< System::IO::Stream outputStream,
SaveFormat  format 
)

Saves the document with a new name along with a file format.

Exceptions
ArgumentExceptionArgumentException when HtmlSaveOptions is passed to a method. Save a document to the html stream is not supported. Please use method save to the file.
Parameters
outputStreamStream where the document will be stored.
formatFormat options.

◆ Save() [6/8]

void Aspose::Pdf::Document::Save ( System::String  outputFileName,
System::SharedPtr< SaveOptions options 
)

Saves the document with a new name setting its save options.

Parameters
outputFileNamePath to file where the document will be stored.
optionsSave options.

◆ Save() [7/8]

void Aspose::Pdf::Document::Save ( System::SharedPtr< System::IO::Stream outputStream,
System::SharedPtr< SaveOptions options 
)

Saves the document to a stream with a save options.

Exceptions
ArgumentExceptionArgumentException when HtmlSaveOptions is passed to a method. Save a document to the html stream is not supported. Please use method save to the file.
Parameters
outputStreamStream where the document will be stored.
optionsSave options.

◆ Save() [8/8]

void Aspose::Pdf::Document::Save ( System::SharedPtr< System::Web::HttpResponse response,
System::String  outputFileName,
ContentDisposition  disposition,
System::SharedPtr< SaveOptions options 
)

Saves the document to a response stream with a save options.

Parameters
responseEncapsulates HTTP-response information.
outputFileNameSimple file name, i.e. without path.
dispositionRepresents a MIME protocol Content-Disposition header.
optionsSave options.

◆ SaveXml()

void Aspose::Pdf::Document::SaveXml ( System::String  file)

Save document to XML.

Parameters
fileThe document model xml file

◆ SendTo() [1/4]

void Aspose::Pdf::Document::SendTo ( System::SharedPtr< Devices::DocumentDevice device,
System::SharedPtr< System::IO::Stream output 
)

Sends the whole document to the document device for processing.

Parameters
deviceDocument device which is used to process the document.
outputOutput stream contains the results of the document processing with given device.

◆ SendTo() [2/4]

void Aspose::Pdf::Document::SendTo ( System::SharedPtr< Devices::DocumentDevice device,
int32_t  fromPage,
int32_t  toPage,
System::SharedPtr< System::IO::Stream output 
)

Sends the certain pages of the document to the document device for processing.

Parameters
deviceDocument device which is used to process the document.
fromPageThe first page for processing.
toPageThe last page for processing.
outputOutput stream contains the results of the document pages processing with given device.

◆ SendTo() [3/4]

void Aspose::Pdf::Document::SendTo ( System::SharedPtr< Devices::DocumentDevice device,
System::String  outputFileName 
)

Sends the whole document to the document device for processing.

Parameters
deviceDocument device which is used to process the document.
outputFileNameOutput file name with the results of processing.

◆ SendTo() [4/4]

void Aspose::Pdf::Document::SendTo ( System::SharedPtr< Devices::DocumentDevice device,
int32_t  fromPage,
int32_t  toPage,
System::String  outputFileName 
)

Sends the whole document to the document device for processing.

Parameters
deviceDocument device which is used to process the document.
fromPageThe first page for processing.
toPageThe last page for processing.
outputFileNameOutput file name with the results of processing.

◆ set_AllowReusePageContent()

void Aspose::Pdf::Document::set_AllowReusePageContent ( bool  value)

Allows to merge page contents to optimize docuement size. If used then differnet but duplicated pages may reference to the same content object. Please note that this mode may cause side effects like changing page content when other page is changed.

◆ set_ApsPages()

void Aspose::Pdf::Document::set_ApsPages ( System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Rendering::ApsPage >>>  value)
protected

List of APS pages for the case of F1-to-F2 conversion when neither F1 nor F2 is PDF.

◆ set_Background()

void Aspose::Pdf::Document::set_Background ( System::SharedPtr< Color value)

Sets the background color of the document.

◆ set_CenterWindow()

void Aspose::Pdf::Document::set_CenterWindow ( bool  value)

Sets flag specifying whether position of the document's window will be centerd on the screen.

Example demonstrates how to get CenterWindow flag:

Document document = new Document("sample.pdf");
bool value = document.CenterWindow;

◆ set_Collection()

void Aspose::Pdf::Document::set_Collection ( System::SharedPtr< Aspose::Pdf::Collection value)

Gets collection of document.

◆ set_Direction()

void Aspose::Pdf::Document::set_Direction ( Aspose::Pdf::Direction  value)

Sets reading order of text: L2R (left to right) or R2L (right to left).

◆ set_DisplayDocTitle()

void Aspose::Pdf::Document::set_DisplayDocTitle ( bool  value)

Sets flag specifying whether document's window title bar should display document title.

Example demonstrates how to get DisplayDocTitle flag:

Document document = new Document("sample.pdf");
bool value = document.DisplayDocTitle;

◆ set_Duplex()

void Aspose::Pdf::Document::set_Duplex ( PrintDuplex  value)

Sets print duplex mode handling option to use when printing the file from the print dialog.

◆ set_EmbedStandardFonts()

void Aspose::Pdf::Document::set_EmbedStandardFonts ( bool  value)

Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false.

◆ set_EnableObjectUnload()

void Aspose::Pdf::Document::set_EnableObjectUnload ( bool  value)

Get or sets flag which enables document partially be unloaded from memory. This allow to decrease memory usage but may have negative effect on perofmance.

◆ set_FitWindow()

void Aspose::Pdf::Document::set_FitWindow ( bool  value)

Sets flag specifying whether document window must be resized to fit the first displayed page.

Example demonstrates how to get FitWindow flag:

Document document = new Document("sample.pdf");
bool value = document.FitWindow;

◆ set_FontReplaceBehavior()

void Aspose::Pdf::Document::set_FontReplaceBehavior ( Text::TextEditOptions::FontReplace  value)
protected

◆ set_HideMenubar()

void Aspose::Pdf::Document::set_HideMenubar ( bool  value)

Sets flag specifying whether menu bar should be hidden when document is active.

Example demonstrates how to get HideMenubar flag:

Document document = new Document("sample.pdf");
bool value = document.HideMenubar;

◆ set_HideToolBar()

void Aspose::Pdf::Document::set_HideToolBar ( bool  value)

Sets flag specifying whether toolbar should be hidden when document is active.

Example demonstrates how to get HideToolBar flag:

Document document = new Document("sample.pdf");
bool value = document.HideToolBar;

◆ set_HideWindowUI()

void Aspose::Pdf::Document::set_HideWindowUI ( bool  value)

Sets flag specifying whether user interface elements should be hidden when document is active.

Example demonstrates how to get HideWindowUI flag:

Document document = new Document("sample.pdf");
bool value = document.HideWindowUI;

◆ set_IgnoreCorruptedObjects()

void Aspose::Pdf::Document::set_IgnoreCorruptedObjects ( bool  value)

Sets flag of ignoring errors in source files. When pages from source document copied into destination document, copying process is stopped with exception if some objects in source files are corrupted when this flag is false. example: dest.Pages.Add(src.Pages); If this flag is set to true then corrupted objects will be replaced with empty values. By default: true.

◆ set_IsConvertMetadataAndCatalogOnly()

void Aspose::Pdf::Document::set_IsConvertMetadataAndCatalogOnly ( bool  value)
protected

Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true)

◆ set_IsLayersAdded()

void Aspose::Pdf::Document::set_IsLayersAdded ( bool  value)
protected

◆ set_IsLinearized()

void Aspose::Pdf::Document::set_IsLinearized ( bool  value)

Sets a value indicating whether document is linearized.

◆ set_IsParagraphsAdded()

void Aspose::Pdf::Document::set_IsParagraphsAdded ( bool  value)
protected

◆ set_IsXrefGapsAllowed()

void Aspose::Pdf::Document::set_IsXrefGapsAllowed ( bool  value)

Sets the is document pdfa compliant.

◆ set_NonFullScreenPageMode()

void Aspose::Pdf::Document::set_NonFullScreenPageMode ( Aspose::Pdf::PageMode  value)

Sets page mode, specifying how to display the document on exiting full-screen mode.

◆ set_OpenAction()

void Aspose::Pdf::Document::set_OpenAction ( System::SharedPtr< Annotations::IAppointment value)

Sets action performed at document opening.

Example demonstrates how to get CenterWindow flag:

Document document = new Document("sample.pdf");
IAppointment value = document.OpenAction;

◆ set_OptimizeSize()

void Aspose::Pdf::Document::set_OptimizeSize ( bool  value)

Sets optimization flag. When pages are added to document, equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.

◆ set_PageInfo()

void Aspose::Pdf::Document::set_PageInfo ( System::SharedPtr< Aspose::Pdf::PageInfo value)

Sets the page info.(for generator only)

The page info.

◆ set_PageLayout()

void Aspose::Pdf::Document::set_PageLayout ( Aspose::Pdf::PageLayout  value)

Sets page layout which shall be used when the document is opened.

◆ set_PageMode()

void Aspose::Pdf::Document::set_PageMode ( Aspose::Pdf::PageMode  value)

Sets page mode, specifying how document should be displayed when opened.

◆ set_ParentTreeNextKey()

void Aspose::Pdf::Document::set_ParentTreeNextKey ( int32_t  value)
protected

◆ SetResourcesFor()

void Aspose::Pdf::Document::SetResourcesFor ( System::SharedPtr< Engine::Data::IPdfObject >  obj,
System::SharedPtr< Resources res 
)
protected

◆ SetSimpleFontEncodingRule()

void Aspose::Pdf::Document::SetSimpleFontEncodingRule ( HtmlSaveOptions::FontEncodingRules  rule)
protected

◆ SetTitle()

void Aspose::Pdf::Document::SetTitle ( System::String  title)

Set Title for Pdf Document

Parameters
titleDocument's title

◆ SetVentureLicense()

void Aspose::Pdf::Document::SetVentureLicense ( System::SharedPtr< LicenseManagement::VentureLicense >  license)
protected

◆ SetXmpMetadata()

void Aspose::Pdf::Document::SetXmpMetadata ( System::SharedPtr< System::IO::Stream stream)

Set XMP metadata of document.

Parameters
streamStream which contains XMP metadata.

◆ StartOperation()

static void Aspose::Pdf::Document::StartOperation ( )
staticprotected

◆ SuppressUpdate()

void Aspose::Pdf::Document::SuppressUpdate ( )
protected

Suppresses update contents data for all pages The contents is not updated until ResumeUpdate is called

◆ UncompressObject()

void Aspose::Pdf::Document::UncompressObject ( System::SharedPtr< Engine::Data::IPdfObject >  obj)
protected

◆ UpdateMetadata()

static void Aspose::Pdf::Document::UpdateMetadata ( System::SharedPtr< Engine::PdfDocument >  document,
System::SharedPtr< Aspose::Pdf::Metadata metadata 
)
staticprotected

◆ UpdatePages()

void Aspose::Pdf::Document::UpdatePages ( )
protected

◆ UpdatePagesResources()

void Aspose::Pdf::Document::UpdatePagesResources ( )
protected

Copies shared resources into pages.

◆ UpdateXFormResources()

void Aspose::Pdf::Document::UpdateXFormResources ( )
protected

Copies resources from Page into its XForm.

◆ Validate() [1/3]

bool Aspose::Pdf::Document::Validate ( System::String  outputLogFileName,
Aspose::Pdf::PdfFormat  format 
)

Validate document into the specified file.

Parameters
outputLogFileNamePath to file where the comments will be stored.
formatThe pdf format.
Returns
The operation result

◆ Validate() [2/3]

bool Aspose::Pdf::Document::Validate ( System::SharedPtr< System::IO::Stream outputLogStream,
Aspose::Pdf::PdfFormat  format 
)

Validate document into the specified file.

Parameters
outputLogStreamStream where the comments will be stored.
formatThe pdf format.
Returns
The operation result

◆ Validate() [3/3]

bool Aspose::Pdf::Document::Validate ( System::SharedPtr< PdfFormatConversionOptions options)

Validate document into the specified file.

Parameters
optionsset of options for convert PDF document
Returns
The operation result

◆ ValidateAnnotations()

void Aspose::Pdf::Document::ValidateAnnotations ( )
protected

Member Data Documentation

◆ _engineDoc

System::SharedPtr<Engine::IPdfDocument> Aspose::Pdf::Document::_engineDoc
protected

◆ FontSaveOptions

System::SharedPtr<Engine::CommonData::Text::Fonts::Utilities::IDocumentFontSaveOptions> Aspose::Pdf::Document::FontSaveOptions
protected

◆ FontSubstitution

System::Event<void(System::SharedPtr<Text::Font>, System::SharedPtr<Text::Font>)> Aspose::Pdf::Document::FontSubstitution

Occurs when font replaces another font in document.

◆ IsPdfAConversionMode

bool Aspose::Pdf::Document::IsPdfAConversionMode
protected

◆ syncRoot

System::SharedPtr<System::Object> Aspose::Pdf::Document::syncRoot
staticprotected