Aspose::Pdf::Facades::PdfFileInfo Class Referencefinal

Represents a class for accessing meta information of PDF document. More...

Inherits Aspose::Pdf::Facades::SaveableFacade.

Public Member Functions

System::String get_Author ()
 Gets the Author information of PDF document. More...
 
void set_Author (System::String value)
 Sets the Author information of PDF document. More...
 
bool get_IsEncrypted ()
 Checkes whether the PDF document is encrypted. More...
 
bool get_IsPdfFile ()
 Checkes whether the source input is a valid PDF file. More...
 
System::String get_CreationDate ()
 Gets the CreationDate information of PDF document. More...
 
void set_CreationDate (System::String value)
 Sets the CreationDate information of PDF document. More...
 
System::String get_Creator ()
 Gets the Creator information of PDF document. More...
 
void set_Creator (System::String value)
 Sets the Creator information of PDF document. More...
 
bool get_HasCollection ()
 Returns true if the current input file is a 'Portfolio' file containing collection of PDF files in it. More...
 
System::SharedPtr< System::Collections::Generic::Dictionary< System::String, System::String > > get_Header ()
 Gets the customized information of PDF document. More...
 
void set_Header (System::SharedPtr< System::Collections::Generic::Dictionary< System::String, System::String >> value)
 Sets the customized information of PDF document. More...
 
System::String get_InputFile ()
 Gets the input file. More...
 
void set_InputFile (System::String value)
 Sets the input file. More...
 
System::SharedPtr< System::IO::Streamget_InputStream ()
 Gets the input stream. More...
 
void set_InputStream (System::SharedPtr< System::IO::Stream > value)
 Sets the input stream. More...
 
System::String get_Keywords ()
 Gets the Keywords information of PDF document. More...
 
void set_Keywords (System::String value)
 Sets the Keywords information of PDF document. More...
 
System::String get_ModDate ()
 Gets the ModDate date information of PDF document. More...
 
void set_ModDate (System::String value)
 Sets the ModDate date information of PDF document. More...
 
int32_t get_NumberOfPages ()
 Gets the number of document pages. More...
 
System::String get_Producer ()
 Gets the Producer information of PDF document. More...
 
System::String get_Subject ()
 Gets the Subject information of PDF document. More...
 
void set_Subject (System::String value)
 Sets the Subject information of PDF document. More...
 
System::String get_Title ()
 Gets the Title information of PDF document. More...
 
void set_Title (System::String value)
 Sets the Title information of PDF document. More...
 
Aspose::Pdf::PasswordType get_PasswordType ()
 Returns the type of password which was passed for creating PdfFileInfo instance. See possible values in PasswordType. Pay attention that pdf document can be opened using both user (or open) password and owner (or permissions, edit) password. More...
 
bool get_HasOpenPassword ()
 Returns true if password is needed to open password protected pdf document. More...
 
bool get_HasEditPassword ()
 Returns true if password is needed to modify permissions or document security property. Pay attention that this property can be read only if valid password was provided in PdfFileInfo constructor. In case PasswordType is Inaccessible (means that invalid password was provided) reading this property will fail with InvalidPasswordException. More...
 
virtual void BindPdf (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 Initializes the facade. More...
 
 PdfFileInfo ()
 Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class with default values. More...
 
 PdfFileInfo (System::SharedPtr< System::IO::Stream > inputStream)
 Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class. More...
 
 PdfFileInfo (System::SharedPtr< System::IO::Stream > inputStream, System::String password)
 Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class. More...
 
 PdfFileInfo (System::String inputFile)
 Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class. More...
 
 PdfFileInfo (System::String inputFile, System::String password)
 Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class. More...
 
void ClearInfo ()
 Clears all meta information of PDF document. More...
 
System::SharedPtr< DocumentPrivilegeGetDocumentPrivilege ()
 Gets the PDF document privilege settings. More...
 
System::String GetMetaInfo (System::String name)
 Gets customized information of PDF document with property name. If there is no property match the name it will return a blank string. More...
 
float GetPageHeight (int32_t pageNum)
 Gets the height of the specified page. More...
 
int32_t GetPageRotation (int32_t pageNum)
 Gets the rotation of the specified page. More...
 
float GetPageWidth (int32_t pageNum)
 Gets the width of the specified page. More...
 
float GetPageXOffset (int32_t pageNum)
 Gets the horizontal offset of the specified page display area. More...
 
float GetPageYOffset (int32_t pageNum)
 Gets the vertical offset of the specified page display area. More...
 
System::String GetPdfVersion ()
 Gets the version info of PDF document. More...
 
bool SaveNewInfo (System::SharedPtr< System::IO::Stream > outputStream)
 Save updated PDF document into specified stream. More...
 
bool SaveNewInfo (System::String outputFile)
 Save updated PDF document into specified file. More...
 
virtual void Save (System::SharedPtr< System::IO::Stream > destStream)
 Saves the PDF document to the specified file. More...
 
virtual void Save (System::String destFile)
 Saves the PDF document to the specified file. More...
 
void SetMetaInfo (System::String name, System::String value)
 Sets customized information of PDF document. More...
 
bool SaveNewInfoWithXmp (System::String outputFileName)
 Changes the properties specified explicitly by setting file information, other properties remain. More...
 
 PdfFileInfo (System::SharedPtr< Aspose::Pdf::Document > document)
 Initializes new PdfFileInfo object on base of the document . More...
 
virtual void Close ()
 Deinitializes the instance. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::Facade
System::SharedPtr< Aspose::Pdf::Documentget_Document () const
 Gets the document facade is working on. More...
 
virtual void BindPdf (System::String srcFile)
 Initializes the facade. More...
 
virtual void BindPdf (System::SharedPtr< System::IO::Stream > srcStream)
 Initializes the facade. More...
 
void Dispose ()
 Disposes the facade. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::IFacade
virtual void BindPdf (System::SharedPtr< Document > srcDoc)=0
 Binds PDF document for editing. 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)
 

Protected Member Functions

virtual void BindPdf (System::SharedPtr< System::IO::Stream > srcStream, System::String password)
 Initializes the facade. More...
 
virtual void BindPdf (System::String srcFile, System::String password)
 Initializes the facade. More...
 
virtual void AssertDocument () const
 Asserts if the facade is initialized. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
 SaveableFacade ()
 The constructor. More...
 
 SaveableFacade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::Facade
 Facade ()
 The constructor. More...
 
 Facade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 

Additional Inherited Members

- 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...
 
- 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...
 

Detailed Description

Represents a class for accessing meta information of PDF document.

Constructor & Destructor Documentation

◆ PdfFileInfo() [1/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( )

Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class with default values.

◆ PdfFileInfo() [2/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( System::SharedPtr< System::IO::Stream inputStream)

Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class.

Parameters
inputStreamStream where input file is placed.

◆ PdfFileInfo() [3/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( System::SharedPtr< System::IO::Stream inputStream,
System::String  password 
)

Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class.

Parameters
inputStreamStream where input file is placed.
passwordPassword for access to file.

◆ PdfFileInfo() [4/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( System::String  inputFile)

Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class.

Parameters
inputFileName of file containing input file.

◆ PdfFileInfo() [5/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( System::String  inputFile,
System::String  password 
)

Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class.

Parameters
inputFileName of file containing input file.
passwordPassword for access to file.

◆ PdfFileInfo() [6/6]

Aspose::Pdf::Facades::PdfFileInfo::PdfFileInfo ( System::SharedPtr< Aspose::Pdf::Document document)

Initializes new PdfFileInfo object on base of the document .

Parameters
documentPdf document.

Member Function Documentation

◆ AssertDocument()

virtual void Aspose::Pdf::Facades::PdfFileInfo::AssertDocument ( ) const
protectedvirtual

Asserts if the facade is initialized.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ BindPdf() [1/3]

virtual void Aspose::Pdf::Facades::PdfFileInfo::BindPdf ( System::SharedPtr< Aspose::Pdf::Document srcDoc)
virtual

Initializes the facade.

Parameters
srcDocThe Aspose.Pdf.Document object.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ BindPdf() [2/3]

virtual void Aspose::Pdf::Facades::PdfFileInfo::BindPdf ( System::SharedPtr< System::IO::Stream srcStream,
System::String  password 
)
protectedvirtual

Initializes the facade.

Parameters
srcStreamThe stream of PDF file.
passwordThe password of the PDF document.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ BindPdf() [3/3]

virtual void Aspose::Pdf::Facades::PdfFileInfo::BindPdf ( System::String  srcFile,
System::String  password 
)
protectedvirtual

Initializes the facade.

Parameters
srcFileThe PDF file.
passwordThe password of the PDF document.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ ClearInfo()

void Aspose::Pdf::Facades::PdfFileInfo::ClearInfo ( )

Clears all meta information of PDF document.

◆ Close()

virtual void Aspose::Pdf::Facades::PdfFileInfo::Close ( )
virtual

Deinitializes the instance.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ get_Author()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Author ( )

Gets the Author information of PDF document.

◆ get_CreationDate()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_CreationDate ( )

Gets the CreationDate information of PDF document.

◆ get_Creator()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Creator ( )

Gets the Creator information of PDF document.

◆ get_HasCollection()

bool Aspose::Pdf::Facades::PdfFileInfo::get_HasCollection ( )

Returns true if the current input file is a 'Portfolio' file containing collection of PDF files in it.

◆ get_HasEditPassword()

bool Aspose::Pdf::Facades::PdfFileInfo::get_HasEditPassword ( )

Returns true if password is needed to modify permissions or document security property. Pay attention that this property can be read only if valid password was provided in PdfFileInfo constructor. In case PasswordType is Inaccessible (means that invalid password was provided) reading this property will fail with InvalidPasswordException.

◆ get_HasOpenPassword()

bool Aspose::Pdf::Facades::PdfFileInfo::get_HasOpenPassword ( )

Returns true if password is needed to open password protected pdf document.

◆ get_Header()

System::SharedPtr<System::Collections::Generic::Dictionary<System::String, System::String> > Aspose::Pdf::Facades::PdfFileInfo::get_Header ( )

Gets the customized information of PDF document.

◆ get_InputFile()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_InputFile ( )

Gets the input file.

◆ get_InputStream()

System::SharedPtr<System::IO::Stream> Aspose::Pdf::Facades::PdfFileInfo::get_InputStream ( )

Gets the input stream.

◆ get_IsEncrypted()

bool Aspose::Pdf::Facades::PdfFileInfo::get_IsEncrypted ( )

Checkes whether the PDF document is encrypted.

◆ get_IsPdfFile()

bool Aspose::Pdf::Facades::PdfFileInfo::get_IsPdfFile ( )

Checkes whether the source input is a valid PDF file.

◆ get_Keywords()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Keywords ( )

Gets the Keywords information of PDF document.

◆ get_ModDate()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_ModDate ( )

Gets the ModDate date information of PDF document.

◆ get_NumberOfPages()

int32_t Aspose::Pdf::Facades::PdfFileInfo::get_NumberOfPages ( )

Gets the number of document pages.

◆ get_PasswordType()

Aspose::Pdf::PasswordType Aspose::Pdf::Facades::PdfFileInfo::get_PasswordType ( )

Returns the type of password which was passed for creating PdfFileInfo instance. See possible values in PasswordType. Pay attention that pdf document can be opened using both user (or open) password and owner (or permissions, edit) password.

◆ get_Producer()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Producer ( )

Gets the Producer information of PDF document.

◆ get_Subject()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Subject ( )

Gets the Subject information of PDF document.

◆ get_Title()

System::String Aspose::Pdf::Facades::PdfFileInfo::get_Title ( )

Gets the Title information of PDF document.

◆ GetDocumentPrivilege()

System::SharedPtr<DocumentPrivilege> Aspose::Pdf::Facades::PdfFileInfo::GetDocumentPrivilege ( )

Gets the PDF document privilege settings.

Returns
The PDF document privilege settings.

◆ GetMetaInfo()

System::String Aspose::Pdf::Facades::PdfFileInfo::GetMetaInfo ( System::String  name)

Gets customized information of PDF document with property name. If there is no property match the name it will return a blank string.

Parameters
nameCustom meta property key.
Returns
Custom meta property value.

◆ GetPageHeight()

float Aspose::Pdf::Facades::PdfFileInfo::GetPageHeight ( int32_t  pageNum)

Gets the height of the specified page.

Parameters
pageNumPage number.
Returns
The height of the page.

◆ GetPageRotation()

int32_t Aspose::Pdf::Facades::PdfFileInfo::GetPageRotation ( int32_t  pageNum)

Gets the rotation of the specified page.

Parameters
pageNumPage number.
Returns
The rotation of the page. The value may be 0,90,180,270.

◆ GetPageWidth()

float Aspose::Pdf::Facades::PdfFileInfo::GetPageWidth ( int32_t  pageNum)

Gets the width of the specified page.

Parameters
pageNumPage number.
Returns
The width of the page.

◆ GetPageXOffset()

float Aspose::Pdf::Facades::PdfFileInfo::GetPageXOffset ( int32_t  pageNum)

Gets the horizontal offset of the specified page display area.

Parameters
pageNumPage number.
Returns
The horizontal offset from the left side of the page.

◆ GetPageYOffset()

float Aspose::Pdf::Facades::PdfFileInfo::GetPageYOffset ( int32_t  pageNum)

Gets the vertical offset of the specified page display area.

Parameters
pageNumPage number.
Returns
The vertical offset of the page display area.

◆ GetPdfVersion()

System::String Aspose::Pdf::Facades::PdfFileInfo::GetPdfVersion ( )

Gets the version info of PDF document.

Returns
The version string.

◆ Save() [1/2]

virtual void Aspose::Pdf::Facades::PdfFileInfo::Save ( System::SharedPtr< System::IO::Stream destStream)
virtual

Saves the PDF document to the specified file.

Parameters
destStreamThe destination stream.

Reimplemented from Aspose::Pdf::Facades::SaveableFacade.

◆ Save() [2/2]

virtual void Aspose::Pdf::Facades::PdfFileInfo::Save ( System::String  destFile)
virtual

Saves the PDF document to the specified file.

Parameters
destFileThe destination file.

Reimplemented from Aspose::Pdf::Facades::SaveableFacade.

◆ SaveNewInfo() [1/2]

bool Aspose::Pdf::Facades::PdfFileInfo::SaveNewInfo ( System::SharedPtr< System::IO::Stream outputStream)

Save updated PDF document into specified stream.

Parameters
outputStreamOutput stream.
Returns
True if success otherwise is false.

◆ SaveNewInfo() [2/2]

bool Aspose::Pdf::Facades::PdfFileInfo::SaveNewInfo ( System::String  outputFile)

Save updated PDF document into specified file.

Parameters
outputFileOutput file.
Returns
True if success otherwise is false.

◆ SaveNewInfoWithXmp()

bool Aspose::Pdf::Facades::PdfFileInfo::SaveNewInfoWithXmp ( System::String  outputFileName)

Changes the properties specified explicitly by setting file information, other properties remain.

Parameters
outputFileNameOutput file.
Returns
True for success, or false.

◆ set_Author()

void Aspose::Pdf::Facades::PdfFileInfo::set_Author ( System::String  value)

Sets the Author information of PDF document.

◆ set_CreationDate()

void Aspose::Pdf::Facades::PdfFileInfo::set_CreationDate ( System::String  value)

Sets the CreationDate information of PDF document.

◆ set_Creator()

void Aspose::Pdf::Facades::PdfFileInfo::set_Creator ( System::String  value)

Sets the Creator information of PDF document.

◆ set_Header()

void Aspose::Pdf::Facades::PdfFileInfo::set_Header ( System::SharedPtr< System::Collections::Generic::Dictionary< System::String, System::String >>  value)

Sets the customized information of PDF document.

◆ set_InputFile()

void Aspose::Pdf::Facades::PdfFileInfo::set_InputFile ( System::String  value)

Sets the input file.

◆ set_InputStream()

void Aspose::Pdf::Facades::PdfFileInfo::set_InputStream ( System::SharedPtr< System::IO::Stream value)

Sets the input stream.

◆ set_Keywords()

void Aspose::Pdf::Facades::PdfFileInfo::set_Keywords ( System::String  value)

Sets the Keywords information of PDF document.

◆ set_ModDate()

void Aspose::Pdf::Facades::PdfFileInfo::set_ModDate ( System::String  value)

Sets the ModDate date information of PDF document.

◆ set_Subject()

void Aspose::Pdf::Facades::PdfFileInfo::set_Subject ( System::String  value)

Sets the Subject information of PDF document.

◆ set_Title()

void Aspose::Pdf::Facades::PdfFileInfo::set_Title ( System::String  value)

Sets the Title information of PDF document.

◆ SetMetaInfo()

void Aspose::Pdf::Facades::PdfFileInfo::SetMetaInfo ( System::String  name,
System::String  value 
)

Sets customized information of PDF document.

Parameters
nameCustom meta property key.
valueCustom meta property value.