Aspose::Pdf::Facades::PdfBookmarkEditor Class Referencefinal

Represents a class to work with PDF file's bookmarks including create, modify, export, import and delete. More...

#include "PdfBookmarkEditor.h"

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

Public Member Functions

ASPOSE_PDF_SHARED_API void CreateBookmarks ()
 Creates bookmarks for all pages. More...
 
ASPOSE_PDF_SHARED_API void CreateBookmarkOfPage (System::String bookmarkName, int32_t pageNumber)
 Creates bookmark for the specified page. More...
 
ASPOSE_PDF_SHARED_API void CreateBookmarks (System::SharedPtr< Bookmark > bookmark)
 Creates the specified bookmark in the document. The method can be used for forming nested bookmarks hierarchy. More...
 
ASPOSE_PDF_SHARED_API void CreateBookmarks (System::Drawing::Color color, bool boldFlag, bool italicFlag)
 Create bookmarks for all pages with specified color and style (bold, italic). More...
 
ASPOSE_PDF_SHARED_API void CreateBookmarkOfPage (System::ArrayPtr< System::String > bookmarkName, System::ArrayPtr< int32_t > pageNumber)
 Creates bookmarks for the specified pages. More...
 
ASPOSE_PDF_SHARED_API void DeleteBookmarks ()
 Deletes all bookmarks of the PDF document. More...
 
ASPOSE_PDF_SHARED_API void DeleteBookmarks (System::String title)
 Deletes the bookmark of the PDF document. More...
 
ASPOSE_PDF_SHARED_API void ModifyBookmarks (System::String sTitle, System::String dTitle)
 Modifys bookmark title according to the specified bookmark title. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< BookmarksExtractBookmarks ()
 Extracts bookmarks of all levels from the document. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< BookmarksExtractBookmarks (bool upperLevel)
 Extracts bookmarks of all levels from the document. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< BookmarksExtractBookmarks (System::String title)
 Extracts the bookmarks with the specified title. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< BookmarksExtractBookmarks (System::SharedPtr< Bookmark > bookmark)
 Extracts the children of a bookmark with a title like in specified bookamrk. More...
 
ASPOSE_PDF_SHARED_API void ExtractBookmarksToHTML (System::String pdfFile, System::String cssFile)
 Exports bookmarks to HTML file. More...
 
ASPOSE_PDF_SHARED_API void ExportBookmarksToXML (System::String xmlFile)
 Exports bookmarks to XML file. More...
 
ASPOSE_PDF_SHARED_API void ExportBookmarksToXML (System::SharedPtr< System::IO::Stream > stream)
 Exports bookmarks to XML stream. More...
 
ASPOSE_PDF_SHARED_API void ImportBookmarksWithXML (System::String xmlFile)
 Imports bookmarks to the document from XML file. More...
 
ASPOSE_PDF_SHARED_API void ImportBookmarksWithXML (System::SharedPtr< System::IO::Stream > stream)
 Imports bookmarks to the document from XML file. More...
 
ASPOSE_PDF_SHARED_API PdfBookmarkEditor ()
 Initializes new PdfBookmarkEditor object. More...
 
ASPOSE_PDF_SHARED_API PdfBookmarkEditor (System::SharedPtr< Aspose::Pdf::Document > document)
 Initializes new PdfBookmarkEditor object on base of the document . More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
ASPOSE_PDF_SHARED_API void Save (System::String destFile) override
 Saves the PDF document to the specified file. More...
 
ASPOSE_PDF_SHARED_API void Save (System::SharedPtr< System::IO::Stream > destStream) override
 Saves the PDF document to the specified stream. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::Facade
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Documentget_Document () const
 Gets the document facade is working on. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::String srcFile) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > srcStream) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< Aspose::Pdf::Document > srcDoc) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void Close () override
 Disposes Aspose.Pdf.Document bound with a facade. More...
 
ASPOSE_PDF_SHARED_API void Dispose () override
 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 reference 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 int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () 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 (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Static Public Member Functions

static ASPOSE_PDF_SHARED_API void ExportBookmarksToHtml (System::String inPdfFile, System::String outHtmlFile)
 Exports bookmarks to HTML file. 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 ()
 Implements C# typeof(System.Object) construct. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
ASPOSE_PDF_SHARED_API SaveableFacade ()
 The constructor. More...
 
ASPOSE_PDF_SHARED_API SaveableFacade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::Facade
bool get__IsObjectLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
ASPOSE_PDF_SHARED_API Facade ()
 The constructor. More...
 
ASPOSE_PDF_SHARED_API Facade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
virtual ASPOSE_PDF_SHARED_API void BindPdf (System::String srcFile, System::String password)
 Initializes the facade. More...
 
virtual ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > srcStream, System::String password)
 Initializes the facade. More...
 
virtual ASPOSE_PDF_SHARED_API void AssertDocument () const
 Asserts if the facade is initialized. More...
 
virtual ASPOSE_PDF_SHARED_API ~Facade ()
 

Detailed Description

Represents a class to work with PDF file's bookmarks including create, modify, export, import and delete.

Constructor & Destructor Documentation

◆ PdfBookmarkEditor() [1/2]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::PdfBookmarkEditor::PdfBookmarkEditor ( )

Initializes new PdfBookmarkEditor object.

◆ PdfBookmarkEditor() [2/2]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::PdfBookmarkEditor::PdfBookmarkEditor ( System::SharedPtr< Aspose::Pdf::Document document)

Initializes new PdfBookmarkEditor object on base of the document .

Parameters
documentPdf document.

Member Function Documentation

◆ CreateBookmarkOfPage() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::CreateBookmarkOfPage ( System::String  bookmarkName,
int32_t  pageNumber 
)

Creates bookmark for the specified page.

Parameters
bookmarkNameThe specified bookmark name.
pageNumberThe specified desination page.

◆ CreateBookmarkOfPage() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::CreateBookmarkOfPage ( System::ArrayPtr< System::String bookmarkName,
System::ArrayPtr< int32_t >  pageNumber 
)

Creates bookmarks for the specified pages.

Parameters
bookmarkNameBookmarks title array.
pageNumberBookmarks desination page array.

◆ CreateBookmarks() [1/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::CreateBookmarks ( )

Creates bookmarks for all pages.

◆ CreateBookmarks() [2/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::CreateBookmarks ( System::SharedPtr< Bookmark bookmark)

Creates the specified bookmark in the document. The method can be used for forming nested bookmarks hierarchy.

Parameters
bookmarkThe bookmark will be added to the document.

◆ CreateBookmarks() [3/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::CreateBookmarks ( System::Drawing::Color  color,
bool  boldFlag,
bool  italicFlag 
)

Create bookmarks for all pages with specified color and style (bold, italic).

Parameters
colorThe color of title.
boldFlagThe flag of bold attribution.
italicFlagThe flag of italic attribution.

◆ DeleteBookmarks() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::DeleteBookmarks ( )

Deletes all bookmarks of the PDF document.

◆ DeleteBookmarks() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::DeleteBookmarks ( System::String  title)

Deletes the bookmark of the PDF document.

Parameters
titleThe title of bookmark deleted.

◆ ExportBookmarksToHtml()

static ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ExportBookmarksToHtml ( System::String  inPdfFile,
System::String  outHtmlFile 
)
static

Exports bookmarks to HTML file.

Parameters
inPdfFileInput PDF file which bookmarks will be exported.
outHtmlFileOutput HTML file

◆ ExportBookmarksToXML() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ExportBookmarksToXML ( System::String  xmlFile)

Exports bookmarks to XML file.

Parameters
xmlFileThe output XML file.

◆ ExportBookmarksToXML() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ExportBookmarksToXML ( System::SharedPtr< System::IO::Stream stream)

Exports bookmarks to XML stream.

Parameters
streamOutput stream where data will be stored.

◆ ExtractBookmarks() [1/4]

ASPOSE_PDF_SHARED_API System::SharedPtr<Bookmarks> Aspose::Pdf::Facades::PdfBookmarkEditor::ExtractBookmarks ( )

Extracts bookmarks of all levels from the document.

Returns
The bookmarks collection of all bookmarks that exist in the document.

◆ ExtractBookmarks() [2/4]

ASPOSE_PDF_SHARED_API System::SharedPtr<Bookmarks> Aspose::Pdf::Facades::PdfBookmarkEditor::ExtractBookmarks ( bool  upperLevel)

Extracts bookmarks of all levels from the document.

Parameters
upperLevelIf true, extracts only upper level bookmarks. Else, extracts all bookmarks recursively.
Returns
List of extracted bookmarks.

◆ ExtractBookmarks() [3/4]

ASPOSE_PDF_SHARED_API System::SharedPtr<Bookmarks> Aspose::Pdf::Facades::PdfBookmarkEditor::ExtractBookmarks ( System::String  title)

Extracts the bookmarks with the specified title.

Parameters
titleExtracted item title.
Returns
Bookmark collection has items with the same title.

◆ ExtractBookmarks() [4/4]

ASPOSE_PDF_SHARED_API System::SharedPtr<Bookmarks> Aspose::Pdf::Facades::PdfBookmarkEditor::ExtractBookmarks ( System::SharedPtr< Bookmark bookmark)

Extracts the children of a bookmark with a title like in specified bookamrk.

Parameters
bookmarkThe specified bookamrk.
Returns
Bookmark collection with child bookmarks.

◆ ExtractBookmarksToHTML()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ExtractBookmarksToHTML ( System::String  pdfFile,
System::String  cssFile 
)

Exports bookmarks to HTML file.

Deprecated:
Use PdfBookmarkEditor.ExportBookmarksToHtml instead.
Parameters
pdfFileThe PDF file which bookmarks will be exported.
cssFileThe CSS file to display HTML file, can be null.

◆ ImportBookmarksWithXML() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ImportBookmarksWithXML ( System::String  xmlFile)

Imports bookmarks to the document from XML file.

Parameters
xmlFileThe XML file containing bookmarks list.

◆ ImportBookmarksWithXML() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ImportBookmarksWithXML ( System::SharedPtr< System::IO::Stream stream)

Imports bookmarks to the document from XML file.

Parameters
streamStream with bookmarks data.

◆ ModifyBookmarks()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::PdfBookmarkEditor::ModifyBookmarks ( System::String  sTitle,
System::String  dTitle 
)

Modifys bookmark title according to the specified bookmark title.

Parameters
sTitleSource bookmark title.
dTitleModified bookmark title.