Action performed when corrupted file was met in concatenation process. More...

Inherits Aspose::Pdf::LicenseManagement::IVentureLicenseTarget.

Classes

class  ContentsResizeParameters
 Class for specifing page resize parameters. Allow to set the following parameters: Size of result page (width, height) in default space units or in percents of initial pages size; Left, Top, Bottom and Right margins in default space units or in percents of initial page size; Some values may be left null for automatic calculation. These values will be calculated from rest of page size after calculation explicitly specified values. For example: if page width = 100 and new page width specified 60 units then left and right margins are automatically calculated: (100 - 60) / 2 = 15. This class is used in ResizeContents method. More...
 
class  ContentsResizeValue
 Value of margin or content size specified in percents of default space units. This class is used in ContentsResizeParameters. More...
 
class  CorruptedItem
 Class which provides information about corrupted files in time of concatenation. More...
 
class  PageBreak
 Data of page break position. More...
 

Public Types

enum  ConcatenateCorruptedFileAction { ConcatenateCorruptedFileAction::StopWithError, ConcatenateCorruptedFileAction::ConcatenateIgnoringCorrupted, ConcatenateCorruptedFileAction::ConcatenateIgnoringCorruptedObjects }
 Action performed when corrupted file was met in concatenation process. More...
 
- 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::String get_ConversionLog ()
 Gets log of conversion process. More...
 
bool get_MergeDuplicateLayers () const
 Optional contents of concatentated documents with equal names will be merged into one layer in resulstant document if this property is true. Else, layers with equal names will be save as different layers in resultant document. More...
 
void set_MergeDuplicateLayers (bool value)
 Optional contents of concatentated documents with equal names will be merged into one layer in resulstant document if this property is true. Else, layers with equal names will be save as different layers in resultant document. More...
 
bool get_CopyOutlines () const
 If true then outlines will be copied. More...
 
void set_CopyOutlines (bool value)
 If true then outlines will be copied. More...
 
bool get_CopyLogicalStructure () const
 If true then logical structure of the file is copied when concatenation is performed. More...
 
void set_CopyLogicalStructure (bool value)
 If true then logical structure of the file is copied when concatenation is performed. More...
 
bool get_MergeDuplicateOutlines () const
 If true, duplicate outlines are merged. More...
 
void set_MergeDuplicateOutlines (bool value)
 If true, duplicate outlines are merged. More...
 
bool get_PreserveUserRights () const
 If true, user rights of first document are applied to concatenated document. User rights of all other documents are ignored. More...
 
void set_PreserveUserRights (bool value)
 If true, user rights of first document are applied to concatenated document. User rights of all other documents are ignored. More...
 
bool get_IncrementalUpdates () const
 If true, incremental updates are made during concatenation. More...
 
void set_IncrementalUpdates (bool value)
 If true, incremental updates are made during concatenation. More...
 
bool get_OptimizeSize () const
 Gets optimization flag. 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. 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...
 
System::ArrayPtr< System::SharedPtr< PdfFileEditor::CorruptedItem > > get_CorruptedItems ()
 Array of encountered problems when concatenation was performed. For every corrupted document from passed to Concatenate() function new CorruptedItem entry is created. This property may be used only when CorruptedFileAction is ConcatenateIgnoringCorrupted.
//concatenate documents and show information about corrupted documents
pfe.CorruptedFileAction = PdfFileEditor.ConcatenateCorruptedFileActions.ConcatenateIgnoringCorrupted;
if (pfe.CorruptedItems.Length >0)
{
foreach(PdfFileEditor.CorruptedItem item in pfe.CorruptedItems)
{
Console.WriteLine(item.Index + " reason: " + item.Exception);
}
}
More...
 
PdfFileEditor::ConcatenateCorruptedFileAction get_CorruptedFileAction () const
 This property defines behavior when concatenating process met corrupted file. Possible values are: StopWithError and ConcatenateIgnoringCorrupted. More...
 
void set_CorruptedFileAction (PdfFileEditor::ConcatenateCorruptedFileAction value)
 This property defines behavior when concatenating process met corrupted file. Possible values are: StopWithError and ConcatenateIgnoringCorrupted. More...
 
System::String get_OwnerPassword () const
 Sets owner's password if the source input Pdf file is encrypted. This property is not implemented yet. More...
 
void set_OwnerPassword (System::String value)
 Sets owner's password if the source input Pdf file is encrypted. This property is not implemented yet. More...
 
bool get_AllowConcatenateExceptions () const
 If set to true, exceptions are thrown if error occured. Else excetion are not thrown and methods return false if failed. More...
 
void set_AllowConcatenateExceptions (bool value)
 If set to true, exceptions are thrown if error occured. Else excetion are not thrown and methods return false if failed. More...
 
void set_ConvertTo (PdfFormat value)
 Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion. More...
 
bool get_CloseConcatenatedStreams () const
 If set to true, streams are closed after operation. More...
 
void set_CloseConcatenatedStreams (bool value)
 If set to true, streams are closed after operation. More...
 
System::String get_UniqueSuffix () const
 Format of the suffix which is added to field name to make it unique when forms are concatenated. This string must contain NUM% substring which will be replaced with numbers. For example if UniqueSuffix = "ABC%NUM%" then for field "fieldName" names will be: fieldNameABC1, fieldNameABC2, fieldNameABC3 etc. More...
 
void set_UniqueSuffix (System::String value)
 Format of the suffix which is added to field name to make it unique when forms are concatenated. This string must contain NUM% substring which will be replaced with numbers. For example if UniqueSuffix = "ABC%NUM%" then for field "fieldName" names will be: fieldNameABC1, fieldNameABC2, fieldNameABC3 etc. More...
 
bool get_KeepActions () const
 If true actions will be copied from source documents. Defaulkt value : true. More...
 
void set_KeepActions (bool value)
 If true actions will be copied from source documents. Defaulkt value : true. More...
 
bool get_KeepFieldsUnique () const
 If true then field names will be made unique when forms are concatenated. Suffixes will be added to field names, suffix template may be specified in UniqueSuffix property. More...
 
void set_KeepFieldsUnique (bool value)
 If true then field names will be made unique when forms are concatenated. Suffixes will be added to field names, suffix template may be specified in UniqueSuffix property. More...
 
bool get_UseDiskBuffer ()
 If this option used then destination document will be saved on disk periodically and further concatenation will appllied to it as incremental updates. More...
 
void set_UseDiskBuffer (bool value)
 If this option used then destination document will be saved on disk periodically and further concatenation will appllied to it as incremental updates. More...
 
int32_t get_ConcatenationPacketSize () const
 Number of documents concatenated before new incremental update was made during concatenation when UseDiskBuffer is set to true. More...
 
void set_ConcatenationPacketSize (int32_t value)
 Number of documents concatenated before new incremental update was made during concatenation when UseDiskBuffer is set to true. More...
 
System::Exception get_LastException () const
 Gets last occured exception. May be used to check the reason of failure when AllowconcatenateExceptions = false. More...
 
Aspose::Pdf::ContentDisposition get_ContentDisposition () const
 Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. More...
 
void set_ContentDisposition (Aspose::Pdf::ContentDisposition value)
 Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. More...
 
System::SharedPtr< Aspose::Pdf::SaveOptionsget_SaveOptions () const
 Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. More...
 
void set_SaveOptions (System::SharedPtr< Aspose::Pdf::SaveOptions > value)
 Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. More...
 
System::String get_AttachmentName () const
 Gets name of attachment when result of operation is stored into HttpResponse objects as attachment. More...
 
void set_AttachmentName (System::String value)
 Sets name of attachment when result of operation is stored into HttpResponse objects as attachment. More...
 
void SetVentureLicense (System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > license)
 
System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > GetVentureLicense ()
 
 PdfFileEditor ()
 PdfFileEditor constructor. More...
 
bool Concatenate (System::String firstInputFile, System::String secInputFile, System::String outputFile)
 Concatentates two files. More...
 
bool Concatenate (System::SharedPtr< System::IO::Stream > firstInputStream, System::SharedPtr< System::IO::Stream > secInputStream, System::SharedPtr< System::IO::Stream > outputStream)
 Concatenates two files. More...
 
bool Concatenate (System::ArrayPtr< System::SharedPtr< Document >> src, System::SharedPtr< Document > dest)
 Concatenates documents. More...
 
bool Concatenate (System::ArrayPtr< System::String > inputFiles, System::String outputFile)
 Concatenates files into one file. More...
 
bool Concatenate (System::ArrayPtr< System::SharedPtr< System::IO::Stream >> inputStream, System::SharedPtr< System::IO::Stream > outputStream)
 Concatenates files More...
 
bool Concatenate (System::String firstInputFile, System::String secInputFile, System::String blankPageFile, System::String outputFile)
 Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1', p2', p3'. Merging the two Pdf document will produce the result document with pages:p1, p1', p2, p2', p3, p3', p4, blankpage, p5, blankpage. More...
 
bool Concatenate (System::SharedPtr< System::IO::Stream > firstInputStream, System::SharedPtr< System::IO::Stream > secInputStream, System::SharedPtr< System::IO::Stream > blankPageStream, System::SharedPtr< System::IO::Stream > outputStream)
 Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1', p2', p3'. Merging the two Pdf document will produce the result document with pages:p1, p1', p2, p2', p3, p3', p4, blankpage, p5, blankpage. More...
 
bool Append (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< System::SharedPtr< System::IO::Stream >> portStreams, int32_t startPage, int32_t endPage, System::SharedPtr< System::IO::Stream > outputStream)
 Appends pages, which are chosen from array of documents in portStreams. The result document includes firstInputFile and all portStreams documents pages in the range startPage to endPage. More...
 
bool Append (System::String inputFile, System::ArrayPtr< System::String > portFiles, int32_t startPage, int32_t endPage, System::String outputFile)
 Appends pages, which are chosen from portFiles documents. The result document includes firstInputFile and all portFiles documents pages in the range startPage to endPage. More...
 
bool Append (System::String inputFile, System::String portFile, int32_t startPage, int32_t endPage, System::String outputFile)
 Appends pages, which are chosen from portFile within the range from startPage to endPage, in portFile at the end of firstInputFile. More...
 
bool Append (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > portStream, int32_t startPage, int32_t endPage, System::SharedPtr< System::IO::Stream > outputStream)
 Appends pages,which are chosen from portStream within the range from startPage to endPage, in portStream at the end of firstInputStream. More...
 
bool Insert (System::String inputFile, int32_t insertLocation, System::String portFile, int32_t startPage, int32_t endPage, System::String outputFile)
 Inserts pages from an other file into the Pdf file at a position. More...
 
bool Insert (System::SharedPtr< System::IO::Stream > inputStream, int32_t insertLocation, System::SharedPtr< System::IO::Stream > portStream, int32_t startPage, int32_t endPage, System::SharedPtr< System::IO::Stream > outputStream)
 Inserts pages from an other file into the input Pdf file. More...
 
bool Insert (System::String inputFile, int32_t insertLocation, System::String portFile, System::ArrayPtr< int32_t > pageNumber, System::String outputFile)
 Inserts pages from an other file into the input Pdf file. More...
 
bool Insert (System::SharedPtr< System::IO::Stream > inputStream, int32_t insertLocation, System::SharedPtr< System::IO::Stream > portStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::IO::Stream > outputStream)
 Inserts pages from an other file into the input Pdf file. More...
 
bool Delete (System::String inputFile, System::ArrayPtr< int32_t > pageNumber, System::String outputFile)
 Deletes pages specified by number array from input file, saves as a new Pdf file. More...
 
bool Delete (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::IO::Stream > outputStream)
 Deletes pages specified by number array from input file, saves as a new Pdf file. More...
 
bool Extract (System::String inputFile, int32_t startPage, int32_t endPage, System::String outputFile)
 Extracts pages from input file,saves as a new Pdf file. More...
 
bool Extract (System::String inputFile, System::ArrayPtr< int32_t > pageNumber, System::String outputFile)
 Extracts pages specified by number array, saves as a new PDF file. More...
 
bool Extract (System::SharedPtr< System::IO::Stream > inputStream, int32_t startPage, int32_t endPage, System::SharedPtr< System::IO::Stream > outputStream)
 Extracts pages from input file,saves as a new Pdf file. More...
 
bool Extract (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::IO::Stream > outputStream)
 Extracts pages specified by number array, saves as a new Pdf file. More...
 
bool SplitFromFirst (System::String inputFile, int32_t location, System::String outputFile)
 Splits Pdf file from first page to specified location,and saves the front part as a new file. More...
 
bool SplitFromFirst (System::SharedPtr< System::IO::Stream > inputStream, int32_t location, System::SharedPtr< System::IO::Stream > outputStream)
 Splits from start to specified location,and saves the front part in output Stream. More...
 
bool SplitToEnd (System::String inputFile, int32_t location, System::String outputFile)
 Splits from location, and saves the rear part as a new file. More...
 
bool SplitToEnd (System::SharedPtr< System::IO::Stream > inputStream, int32_t location, System::SharedPtr< System::IO::Stream > outputStream)
 Splits from specified location, and saves the rear part as a new file Stream. More...
 
bool MakeBooklet (System::String inputFile, System::String outputFile)
 Makes booklet from the input file to output file. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream)
 Makes booklet from the InputStream to outputStream. More...
 
bool MakeBooklet (System::String inputFile, System::String outputFile, System::SharedPtr< PageSize > pageSize)
 Makes booklet from the inputFile to outputFile. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream, System::SharedPtr< PageSize > pageSize)
 Makes booklet from the input stream and save result into output stream. More...
 
bool MakeBooklet (System::String inputFile, System::String outputFile, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages)
 Makes customized booklet from the firstInputFile to outputFile. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages)
 Makes customized booklet from the firstInputStream to outputStream. More...
 
bool MakeBooklet (System::String inputFile, System::String outputFile, System::SharedPtr< PageSize > pageSize, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages)
 Makes customized booklet from the firstInputFile to outputFile. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream, System::SharedPtr< PageSize > pageSize, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages)
 Makes booklet from the firstInputStream to outputStream. More...
 
bool MakeNUp (System::String inputFile, System::String outputFile, int32_t x, int32_t y)
 Makes N-Up document from the firstInputFile to outputFile. More...
 
bool MakeNUp (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream, int32_t x, int32_t y)
 Makes N-Up document from the input stream and saves result into output stream. More...
 
bool MakeNUp (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::IO::Stream > outputStream, int32_t x, int32_t y, System::SharedPtr< PageSize > pageSize)
 Makes N-Up document from the first input stream to output stream. More...
 
bool MakeNUp (System::String firstInputFile, System::String secondInputFile, System::String outputFile)
 Makes N-Up document from the two input PDF files to outputFile. Each page of outputFile will contain two pages, one page is from the first input file and another is from the second input file. The two pages are piled up horizontally. More...
 
bool MakeNUp (System::SharedPtr< System::IO::Stream > firstInputStream, System::SharedPtr< System::IO::Stream > secondInputStream, System::SharedPtr< System::IO::Stream > outputStream)
 Makes N-Up document from the two input PDF streams to outputStream. More...
 
bool MakeNUp (System::ArrayPtr< System::String > inputFiles, System::String outputFile, bool isSidewise)
 Makes N-Up document from the multi input PDF files to outputFile. Each page of outputFile will contain multi pages, which are combination with pages in the input files of the same page number. The multi pages piled up horizontally if isSidewise is true and piled up vertically if isSidewise is false. More...
 
bool MakeNUp (System::ArrayPtr< System::SharedPtr< System::IO::Stream >> inputStreams, System::SharedPtr< System::IO::Stream > outputStream, bool isSidewise)
 Makes N-Up document from the multi input PDF streams to outputStream. Each page of outputStream will contain multi pages, which are combination with pages in the input streams of the same page number. The multi-pages piled up horizontally if isSidewise is true and piled up vertically if isSidewise is false. More...
 
bool MakeNUp (System::String inputFile, System::String outputFile, int32_t x, int32_t y, System::SharedPtr< PageSize > pageSize)
 Makes N-Up document from the input file to outputFile. More...
 
System::ArrayPtr< System::SharedPtr< System::IO::MemoryStream > > SplitToPages (System::String inputFile)
 Splits the PDF file into single-page documents. More...
 
System::ArrayPtr< System::SharedPtr< System::IO::MemoryStream > > SplitToPages (System::SharedPtr< System::IO::Stream > inputStream)
 Splits the Pdf file into single-page documents. More...
 
void SplitToPages (System::String inputFile, System::String fileNameTemplate)
 Split the Pdf file into single-page documents and saves it into specified path. Path is specifield by field name temaplate. More...
 
void SplitToPages (System::SharedPtr< System::IO::Stream > inputStream, System::String fileNameTemplate)
 Split the Pdf file into single-page documents and saves it into specified path. Path is specifield by field name temaplate. More...
 
System::ArrayPtr< System::SharedPtr< System::IO::MemoryStream > > SplitToBulks (System::String inputFile, System::ArrayPtr< System::ArrayPtr< int32_t >> numberOfPage)
 Splits the Pdf file into several documents.The documents can be single-page or multi-pages. More...
 
System::ArrayPtr< System::SharedPtr< System::IO::MemoryStream > > SplitToBulks (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< System::ArrayPtr< int32_t >> numberOfPage)
 Splits the Pdf file into several documents.The documents can be single-page or multi-pages. More...
 
bool ResizeContents (System::SharedPtr< System::IO::Stream > source, System::SharedPtr< System::IO::Stream > destination, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters)
 Resizes contents of pages of the document. More...
 
bool ResizeContents (System::SharedPtr< System::IO::Stream > source, System::SharedPtr< System::IO::Stream > destination, System::ArrayPtr< int32_t > pages, double newWidth, double newHeight)
 Resizes contents of document pages. Shrinks contents of page and adds margins. New size of contents is specified in default space units. More...
 
bool ResizeContentsPct (System::SharedPtr< System::IO::Stream > source, System::SharedPtr< System::IO::Stream > destination, System::ArrayPtr< int32_t > pages, double newWidth, double newHeight)
 Resizes contents of document pages. Shrinks contents of page and adds margins. New contents size is specified in percents. More...
 
bool AddMargins (System::SharedPtr< System::IO::Stream > source, System::SharedPtr< System::IO::Stream > destination, System::ArrayPtr< int32_t > pages, double leftMargin, double rightMargin, double topMargin, double bottomMargin)
 Resizes page contents and add specifed margins. Margins are specified in default space units. More...
 
bool AddMarginsPct (System::SharedPtr< System::IO::Stream > source, System::SharedPtr< System::IO::Stream > destination, System::ArrayPtr< int32_t > pages, double leftMargin, double rightMargin, double topMargin, double bottomMargin)
 Resizes page contents and add specified margins. Margins are specified in percents of intitial page size. More...
 
bool ResizeContents (System::String source, System::String destination, System::ArrayPtr< int32_t > pages, double newWidth, double newHeight)
 Resizes contents of document pages. Shrinks contents of page and adds margins. New size of contents is specified in default space units. More...
 
bool ResizeContentsPct (System::String source, System::String destination, System::ArrayPtr< int32_t > pages, double newWidth, double newHeight)
 Resizes contents of document pages. Shrinks contents of page and adds margins. New contents size is specified in percents. More...
 
bool AddMargins (System::String source, System::String destination, System::ArrayPtr< int32_t > pages, double leftMargin, double rightMargin, double topMargin, double bottomMargin)
 Resizes page contents and add specifed margins. Margins are specified in default space units. More...
 
bool AddMarginsPct (System::String source, System::String destination, System::ArrayPtr< int32_t > pages, double leftMargin, double rightMargin, double topMargin, double bottomMargin)
 Resizes page contents and add specified margins. Margins are specified in percents of intitial page size. More...
 
bool ResizeContents (System::String source, System::String destination, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters)
 Resizes contents of pages in document. If page is shrinked blank margins are added around the page. More...
 
void ResizeContents (System::SharedPtr< Document > source, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters)
 Resizes pages of document. Blank margins are added around of shrinked page. More...
 
void ResizeContents (System::SharedPtr< Document > source, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters)
 Resizes pages of document. Blank margins are added around of shrinked page. More...
 
bool Concatenate (System::ArrayPtr< System::String > inputFiles, System::SharedPtr< System::Web::HttpResponse > response)
 Concatenates files and saves reslt into HttpResposnse object. More...
 
bool Concatenate (System::ArrayPtr< System::SharedPtr< System::IO::Stream >> inputStream, System::SharedPtr< System::Web::HttpResponse > response)
 Concatenates files and stores result into HttpResponse object. More...
 
bool Append (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< System::SharedPtr< System::IO::Stream >> portStreams, int32_t startPage, int32_t endPage, System::SharedPtr< System::Web::HttpResponse > response)
 Appends documents to source document and saves result into response object. More...
 
bool Append (System::String inputFile, System::ArrayPtr< System::String > portFiles, int32_t startPage, int32_t endPage, System::SharedPtr< System::Web::HttpResponse > response)
 Appends documents to source document and saves result into HttpResponse object. More...
 
bool Insert (System::String inputFile, int32_t insertLocation, System::String portFile, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Inserts contents of file into source file and stores result into HttpResponse object. More...
 
bool Insert (System::SharedPtr< System::IO::Stream > inputStream, int32_t insertLocation, System::SharedPtr< System::IO::Stream > portStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Inserts document into other document and stores result into response object. More...
 
bool Delete (System::String inputFile, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Deletes specified pages from document and stores result into HttpResponse object. More...
 
bool Delete (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Deletes specified pages from document and saves result into HttpResponse object. More...
 
bool Extract (System::SharedPtr< System::IO::Stream > inputStream, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Extracts specified pages form source file and stores result into HttpResponse object. More...
 
bool Extract (System::String inputFile, System::ArrayPtr< int32_t > pageNumber, System::SharedPtr< System::Web::HttpResponse > response)
 Extracts specified pages from source file and stores result into HttpResponse object. More...
 
bool SplitFromFirst (System::String inputFile, int32_t location, System::SharedPtr< System::Web::HttpResponse > response)
 Splits document from first page to location and saves result into HttpResponse objects. More...
 
bool SplitFromFirst (System::SharedPtr< System::IO::Stream > inputStream, int32_t location, System::SharedPtr< System::Web::HttpResponse > response)
 Splits document from start to specified location and stores result into HttpResponse object. More...
 
bool SplitToEnd (System::SharedPtr< System::IO::Stream > inputStream, int32_t location, System::SharedPtr< System::Web::HttpResponse > response)
 Splits from specified location, and saves the rear part into HttpResponse object. More...
 
bool SplitToEnd (System::String inputFile, int32_t location, System::SharedPtr< System::Web::HttpResponse > response)
 Splits from specified location, and saves the rear part into HttpResponse object. More...
 
bool MakeBooklet (System::String inputFile, System::SharedPtr< PageSize > pageSize, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages, System::SharedPtr< System::Web::HttpResponse > response)
 Makes booklet from source file and stores result into HttpResponse objects. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< PageSize > pageSize, System::ArrayPtr< int32_t > leftPages, System::ArrayPtr< int32_t > rightPages, System::SharedPtr< System::Web::HttpResponse > response)
 Make booklet from PDF file and stores it into HttpResponse. More...
 
bool MakeBooklet (System::String inputFile, System::SharedPtr< PageSize > pageSize, System::SharedPtr< System::Web::HttpResponse > response)
 Makes booklet from source file and stores result into HttpResponse objects. More...
 
bool MakeBooklet (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< PageSize > pageSize, System::SharedPtr< System::Web::HttpResponse > response)
 Makes booklet from source file and stores result into HttpResponse. More...
 
bool MakeNUp (System::SharedPtr< System::IO::Stream > inputStream, int32_t x, int32_t y, System::SharedPtr< PageSize > pageSize, System::SharedPtr< System::Web::HttpResponse > response)
 Makes N-up document and stores result into HttpResponse object. More...
 
bool MakeNUp (System::String inputFile, int32_t x, int32_t y, System::SharedPtr< PageSize > pageSize, System::SharedPtr< System::Web::HttpResponse > response)
 Makes N-up document and stores result into HttpResponse object. More...
 
bool MakeNUp (System::String inputFile, int32_t x, int32_t y, System::SharedPtr< System::Web::HttpResponse > response)
 Makes N-up document and stores result into HttpResponse. More...
 
bool MakeNUp (System::SharedPtr< System::IO::Stream > inputStream, int32_t x, int32_t y, System::SharedPtr< System::Web::HttpResponse > response)
 Makes N-up document and stores result into HttpResponse. More...
 
bool ResizeContents (System::String source, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters, System::SharedPtr< System::Web::HttpResponse > response)
 Resizes contents of pages in document. If page is shrinked blank margins are added around the page.Result is stored into HttpResponse object. More...
 
bool ResizeContents (System::SharedPtr< System::IO::Stream > source, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters, System::SharedPtr< System::Web::HttpResponse > response)
 Resizes contents of pages in document. If page is shrinked blank margins are added around the page.Result is stored into HttpResponse object. More...
 
void AddPageBreak (System::SharedPtr< Document > src, System::SharedPtr< Document > dest, System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >> pageBreaks)
 Adds page breaks into document pages. More...
 
void AddPageBreak (System::String src, System::String dest, System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >> pageBreaks)
 Adds page breaks into document pages. More...
 
void AddPageBreak (System::SharedPtr< System::IO::Stream > src, System::SharedPtr< System::IO::Stream > dest, System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >> pageBreaks)
 Adds page breaks into document pages. More...
 
- Public Member Functions inherited from Aspose::Pdf::LicenseManagement::IVentureLicenseTarget
virtual void SetVentureLicense (System::SharedPtr< VentureLicense > license)=0
 
- 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 () 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

bool get__IsObjectLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
void ResizeContents (System::SharedPtr< Document > source, System::SharedPtr< Document > dest, System::ArrayPtr< int32_t > pages, System::SharedPtr< PdfFileEditor::ContentsResizeParameters > parameters)
 Resizes pages of document. Blank margins are added around of shrinked page. More...
 

Static Protected Attributes

static const System::String E_EMPTY_PAGE_RANGE
 
static const System::String E_SMALL_PAGE_RANGE
 
static const System::String E_WRONG_PAGE_RANGE
 

Additional Inherited Members

- 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

Action performed when corrupted file was met in concatenation process.

Member Enumeration Documentation

◆ ConcatenateCorruptedFileAction

Action performed when corrupted file was met in concatenation process.

Enumerator
StopWithError 

If corrupted file was met, then stop concatentation process and return error.

ConcatenateIgnoringCorrupted 

If corrupted file was met, then don't stop concatenation and don't process corrupted file. List of corrupted files is accessible in Failures property.

ConcatenateIgnoringCorruptedObjects 

When corrupted object is met in source document, process will not stopped and corrupted object only is ignored.

Constructor & Destructor Documentation

◆ PdfFileEditor()

Aspose::Pdf::Facades::PdfFileEditor::PdfFileEditor ( )

PdfFileEditor constructor.

Member Function Documentation

◆ AddMargins() [1/2]

bool Aspose::Pdf::Facades::PdfFileEditor::AddMargins ( System::SharedPtr< System::IO::Stream source,
System::SharedPtr< System::IO::Stream destination,
System::ArrayPtr< int32_t >  pages,
double  leftMargin,
double  rightMargin,
double  topMargin,
double  bottomMargin 
)

Resizes page contents and add specifed margins. Margins are specified in default space units.

Parameters
sourceStream which contains source document.
destinationStream where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
leftMarginLeft margin.
rightMarginRight margin.
topMarginTop margin.
bottomMarginBottom margin.
Returns
true if operation was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
fileEditor.AddMargins(src, dest,
//process pages 1, 2, 3
new int[] { 1, 2, 3},
//left margin is 10 units
10,
//right margin is 5 units
5,
//top margin is 5 units
5,
//bottom margin is 5 units
5);
dest.Close();

◆ AddMargins() [2/2]

bool Aspose::Pdf::Facades::PdfFileEditor::AddMargins ( System::String  source,
System::String  destination,
System::ArrayPtr< int32_t >  pages,
double  leftMargin,
double  rightMargin,
double  topMargin,
double  bottomMargin 
)

Resizes page contents and add specifed margins. Margins are specified in default space units.

Parameters
sourcePath to source document.
destinationPath where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
leftMarginLeft margin.
rightMarginRight margin.
topMarginTop margin.
bottomMarginBottom margin.
Returns
true if resize was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.AddMargins("input.pdf", "output.pdf",
//process pages 1, 2, 3
new int[] { 1, 2, 3},
//left margin is 10 units
10,
//right margin is 5 units
5,
//top margin is 5 units
5,
//bottom margin is 5 units
5);

◆ AddMarginsPct() [1/2]

bool Aspose::Pdf::Facades::PdfFileEditor::AddMarginsPct ( System::SharedPtr< System::IO::Stream source,
System::SharedPtr< System::IO::Stream destination,
System::ArrayPtr< int32_t >  pages,
double  leftMargin,
double  rightMargin,
double  topMargin,
double  bottomMargin 
)

Resizes page contents and add specified margins. Margins are specified in percents of intitial page size.

Parameters
sourceStream which contains source document.
destinationStream where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
leftMarginLeft margin in percents of initial page size.
rightMarginRight margin in percents of initial page size.
topMarginTop margin in percents of initial page size.
bottomMarginBottom margin in percents of initial page size.
Returns
true if action was performed successfully.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
fileEditor.AddMarginsPct(src, dest,
//process pages 1, 2, 3
new int[] { 1, 2, 3},
//left margin is 15% of page width
15,
//right margin is 10% of page width
10,
//top margin is 20% of page width
20,
//bottom margin is 5% of page width
5);
dest.Close();

◆ AddMarginsPct() [2/2]

bool Aspose::Pdf::Facades::PdfFileEditor::AddMarginsPct ( System::String  source,
System::String  destination,
System::ArrayPtr< int32_t >  pages,
double  leftMargin,
double  rightMargin,
double  topMargin,
double  bottomMargin 
)

Resizes page contents and add specified margins. Margins are specified in percents of intitial page size.

Parameters
sourcePath to source document.
destinationPath where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
leftMarginLeft margin in percents of initial page size.
rightMarginRight margin in percents of initial page size.
topMarginTop margin in percents of initial page size.
bottomMarginBottom margin in percents of initial page size.
Returns
true if resize was successful
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.AddMarginsPct("input.pdf", "output.pdf",
//process pages 1, 2, 3
new int[] { 1, 2, 3},
//left margin is 15% of page width
15,
//right margin is 10% of page width
10,
//top margin is 20% of page width
20,
//bottom margin is 5% of page width
5);

◆ AddPageBreak() [1/3]

void Aspose::Pdf::Facades::PdfFileEditor::AddPageBreak ( System::SharedPtr< Document src,
System::SharedPtr< Document dest,
System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >>  pageBreaks 
)

Adds page breaks into document pages.

Parameters
srcSource document.
destDestination document.
pageBreaksArray of PageBreak objects which describe places of page breaks.

◆ AddPageBreak() [2/3]

void Aspose::Pdf::Facades::PdfFileEditor::AddPageBreak ( System::String  src,
System::String  dest,
System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >>  pageBreaks 
)

Adds page breaks into document pages.

Parameters
srcPath to source document.
destPath to destination document.
pageBreaksArray of PageBreak object describing pages and places where page break will be added.

◆ AddPageBreak() [3/3]

void Aspose::Pdf::Facades::PdfFileEditor::AddPageBreak ( System::SharedPtr< System::IO::Stream src,
System::SharedPtr< System::IO::Stream dest,
System::ArrayPtr< System::SharedPtr< PdfFileEditor::PageBreak >>  pageBreaks 
)

Adds page breaks into document pages.

Parameters
srcSource which contains source document.
destSource where destination document will be saved.
pageBreaksArray of PageBreak object describing pages and places where page break will be added.

◆ Append() [1/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< System::SharedPtr< System::IO::Stream >>  portStreams,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::IO::Stream outputStream 
)

Appends pages, which are chosen from array of documents in portStreams. The result document includes firstInputFile and all portStreams documents pages in the range startPage to endPage.

Parameters
inputStreamInput Pdf stream.
portStreamsDocuments to copy pages from.
startPagePage starts in portStreams documents.
endPagePage ends in portStreams documents .
outputStreamOutput Pdf stream.
Returns
True for success, or false.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream instream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Append(instream, new Stream[] { stream1, stream2}, 3, 5, outstream);

◆ Append() [2/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::String  inputFile,
System::ArrayPtr< System::String portFiles,
int32_t  startPage,
int32_t  endPage,
System::String  outputFile 
)

Appends pages, which are chosen from portFiles documents. The result document includes firstInputFile and all portFiles documents pages in the range startPage to endPage.

Parameters
inputFileInput Pdf file.
portFilesDocuments to copy pages from.
startPagePage starts in portFiles documents.
endPagePage ends in portFiles documents .
outputFileOutput Pdf document.
Returns
True if operation was succeeded.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Append("input.pdf", new string[] { "file1.pdf", "file2.pdf"}, 3, 5, "outfile.pdf");

◆ Append() [3/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::String  inputFile,
System::String  portFile,
int32_t  startPage,
int32_t  endPage,
System::String  outputFile 
)

Appends pages, which are chosen from portFile within the range from startPage to endPage, in portFile at the end of firstInputFile.

Parameters
inputFileInput Pdf file.
portFilePages from Pdf file.
startPagePage starts in portFile.
endPagePage ends in portFile.
outputFileOutput Pdf document.
Returns
True if operation was succeeded.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Append("input.pdf", "file1.pdf", 3, 5, "outfile.pdf");

◆ Append() [4/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream portStream,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::IO::Stream outputStream 
)

Appends pages,which are chosen from portStream within the range from startPage to endPage, in portStream at the end of firstInputStream.

Parameters
inputStreamInput file Stream.
portStreamPages from Pdf file Stream.
startPagePage starts in portFile Stream.
endPagePage ends in portFile Stream.
outputStreamOutput Pdf file Stream.
Returns
True for success, or false.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream instream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Append(instream, stream1, 3, 5, "outfile.pdf");

◆ Append() [5/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< System::SharedPtr< System::IO::Stream >>  portStreams,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::Web::HttpResponse response 
)

Appends documents to source document and saves result into response object.

Parameters
inputStreamStream which contains source document.
portStreamsArray of streams with documents to be appended.
startPageStart page of appended page.
endPageEnd page of appended pages.
responseResponse object where document will be saved.
Returns
true if operation was successful.

◆ Append() [6/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Append ( System::String  inputFile,
System::ArrayPtr< System::String portFiles,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::Web::HttpResponse response 
)

Appends documents to source document and saves result into HttpResponse object.

Parameters
inputFileName of file containing source document.
portFilesArray of file names containing appended documents
startPageStart page of appended pages.
endPageEnd page of appended pages.
responseResponse object where document will be saved.
Returns
true if operation was succeeded.

◆ Concatenate() [1/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::String  firstInputFile,
System::String  secInputFile,
System::String  outputFile 
)

Concatentates two files.

Parameters
firstInputFileFirst file to concatenate.
secInputFileSecond file to concatenate.
outputFileOutput file.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Concatenate("file1.pdf", "file2.pdf", "outfile.pdf");
Returns
True if operation was succeeded.

◆ Concatenate() [2/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::SharedPtr< System::IO::Stream firstInputStream,
System::SharedPtr< System::IO::Stream secInputStream,
System::SharedPtr< System::IO::Stream outputStream 
)

Concatenates two files.

Parameters
firstInputStreamStream of first file.
secInputStreamStream of second file.
outputStreamStream where result file will be stored.
Returns
True if operation was succeeded.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Concatenate(stream1, stream2, outstream);
Returns
True if operation was succeeded.

◆ Concatenate() [3/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::ArrayPtr< System::SharedPtr< Document >>  src,
System::SharedPtr< Document dest 
)

Concatenates documents.

Parameters
srcArray of source documents.
destDestination document.
Returns
True if concatenation is successful.

◆ Concatenate() [4/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::ArrayPtr< System::String inputFiles,
System::String  outputFile 
)

Concatenates files into one file.

Parameters
inputFilesArray of files to concatenate.
outputFileName of output file.
Returns
True if operation was succeeded.
pfe.Concatenate(new string[] { "src1.pdf", "src2.pdf" }, "dest.pdf");

◆ Concatenate() [5/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::ArrayPtr< System::SharedPtr< System::IO::Stream >>  inputStream,
System::SharedPtr< System::IO::Stream outputStream 
)

Concatenates files

Parameters
inputStreamArray of streams to be concatenated.
outputStreamStream where result file will be stored.
Returns
True if operation was succeeded.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Concatenate(new Stream[] { stream1, stream2 } , outstream);

◆ Concatenate() [6/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::String  firstInputFile,
System::String  secInputFile,
System::String  blankPageFile,
System::String  outputFile 
)

Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1', p2', p3'. Merging the two Pdf document will produce the result document with pages:p1, p1', p2, p2', p3, p3', p4, blankpage, p5, blankpage.

Parameters
firstInputFileFirst file.
secInputFileSecond file.
blankPageFilePDF file with blank page.
outputFileResult file.
Returns
True if operation was succeeded.
pfe.Concatenate("src1.pdf", "src2.pdf", "blank.pdf", "dest.pdf");

◆ Concatenate() [7/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::SharedPtr< System::IO::Stream firstInputStream,
System::SharedPtr< System::IO::Stream secInputStream,
System::SharedPtr< System::IO::Stream blankPageStream,
System::SharedPtr< System::IO::Stream outputStream 
)

Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1', p2', p3'. Merging the two Pdf document will produce the result document with pages:p1, p1', p2, p2', p3, p3', p4, blankpage, p5, blankpage.

Parameters
firstInputStreamThe first Pdf Stream.
secInputStreamThe second Pdf Stream.
blankPageStreamThe Pdf Stream with blank page
outputStreamOutput Pdf Stream.
Returns
True if operation was succeeded.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream blank = new FileStream("blank.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Concatenate(new Stream[] { stream1, stream2, blank } , outstream);

◆ Concatenate() [8/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::ArrayPtr< System::String inputFiles,
System::SharedPtr< System::Web::HttpResponse response 
)

Concatenates files and saves reslt into HttpResposnse object.

Parameters
inputFilesArray of files to concatenate.
responseResponse object.
Returns
true if concatenation was successful.

◆ Concatenate() [9/9]

bool Aspose::Pdf::Facades::PdfFileEditor::Concatenate ( System::ArrayPtr< System::SharedPtr< System::IO::Stream >>  inputStream,
System::SharedPtr< System::Web::HttpResponse response 
)

Concatenates files and stores result into HttpResponse object.

Parameters
inputStreamStreams array which contain files to concatenate.
responseResponse object/
Returns
true if operation was succeeded.

◆ Delete() [1/4]

bool Aspose::Pdf::Facades::PdfFileEditor::Delete ( System::String  inputFile,
System::ArrayPtr< int32_t >  pageNumber,
System::String  outputFile 
)

Deletes pages specified by number array from input file, saves as a new Pdf file.

Parameters
inputFileInput file path.
pageNumberIndex of page out of the input file.
outputFileOutput file path.
Returns
True if operation was succeeded.
pfe.Delete("input.pdf", new int[] { 2, 3 }, "out.pdf");

◆ Delete() [2/4]

bool Aspose::Pdf::Facades::PdfFileEditor::Delete ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::IO::Stream outputStream 
)

Deletes pages specified by number array from input file, saves as a new Pdf file.

Parameters
inputStreamInput file Stream.
pageNumberIndex of page out of the input file.
outputStreamOutput file stream.
Returns
True for success, or false.
Stream intputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.Delete(inputStream, new int[] { 2, 3 }, outputStream);

◆ Delete() [3/4]

bool Aspose::Pdf::Facades::PdfFileEditor::Delete ( System::String  inputFile,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Deletes specified pages from document and stores result into HttpResponse object.

Parameters
inputFilePath of source file.
pageNumberArray of page numbers which must be deleted.
responseResponse object where result document will be stored.
Returns
True if operation was succeeded.

◆ Delete() [4/4]

bool Aspose::Pdf::Facades::PdfFileEditor::Delete ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Deletes specified pages from document and saves result into HttpResponse object.

Parameters
inputStreamSource document stream.
pageNumberArray of page numbers which will be deleted.
responseHttpResponse object
Returns
True if operation succeded.

◆ Extract() [1/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::String  inputFile,
int32_t  startPage,
int32_t  endPage,
System::String  outputFile 
)

Extracts pages from input file,saves as a new Pdf file.

Parameters
inputFileInput Pdf file path.
startPageStart page number.
endPageEnd page number.
outputFileOutput Pdf file path.
Returns
True for success, or false.
pfe.Extract("input.pdf", 3, 7, "output.pdf");

◆ Extract() [2/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::String  inputFile,
System::ArrayPtr< int32_t >  pageNumber,
System::String  outputFile 
)

Extracts pages specified by number array, saves as a new PDF file.

Parameters
inputFileInput file path.
pageNumberIndex of page out of the input file.
outputFileOutput file path.
Returns
True if operation was succeeded.
pfe.Extract("input.pdf", new int[] { 3, 5, 7 }, "output.pdf");

◆ Extract() [3/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::IO::Stream outputStream 
)

Extracts pages from input file,saves as a new Pdf file.

Parameters
inputStreamInput file Stream.
startPageStart page number.
endPageEnd page number.
outputStreamOutput Pdf file Stream.
Returns
True for success, or false.
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Extract(sourceStream, 1, 3, 6, outStream);

◆ Extract() [4/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::IO::Stream outputStream 
)

Extracts pages specified by number array, saves as a new Pdf file.

Parameters
inputStreamInput file Stream.
pageNumberIndex of page out of the input file.
outputStreamOutput file stream.
Returns
True for success, or false.
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Extract(sourceStream, new int[] { 3, 5, 8 }, outStream);

◆ Extract() [5/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Extracts specified pages form source file and stores result into HttpResponse object.

Parameters
inputStreamStream of source document.
pageNumberArray of page numbers which will be extracted.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ Extract() [6/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Extract ( System::String  inputFile,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Extracts specified pages from source file and stores result into HttpResponse object.

Parameters
inputFileSource file path.
pageNumberArray of page numbers which will be extracted.
responseHttpResponse object where result will be stored.
Returns
true if pages were extracted successfully.

◆ get__IsObjectLicensed()

bool Aspose::Pdf::Facades::PdfFileEditor::get__IsObjectLicensed ( )
protected

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

◆ get_AllowConcatenateExceptions()

bool Aspose::Pdf::Facades::PdfFileEditor::get_AllowConcatenateExceptions ( ) const

If set to true, exceptions are thrown if error occured. Else excetion are not thrown and methods return false if failed.

pfe.AllowConcatenatedException = true;

◆ get_AttachmentName()

System::String Aspose::Pdf::Facades::PdfFileEditor::get_AttachmentName ( ) const

Gets name of attachment when result of operation is stored into HttpResponse objects as attachment.

◆ get_CloseConcatenatedStreams()

bool Aspose::Pdf::Facades::PdfFileEditor::get_CloseConcatenatedStreams ( ) const

If set to true, streams are closed after operation.

pfe.CloseConcatenatedStreams = true;

◆ get_ConcatenationPacketSize()

int32_t Aspose::Pdf::Facades::PdfFileEditor::get_ConcatenationPacketSize ( ) const

Number of documents concatenated before new incremental update was made during concatenation when UseDiskBuffer is set to true.

◆ get_ContentDisposition()

Aspose::Pdf::ContentDisposition Aspose::Pdf::Facades::PdfFileEditor::get_ContentDisposition ( ) const

Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.

◆ get_ConversionLog()

System::String Aspose::Pdf::Facades::PdfFileEditor::get_ConversionLog ( )

Gets log of conversion process.

◆ get_CopyLogicalStructure()

bool Aspose::Pdf::Facades::PdfFileEditor::get_CopyLogicalStructure ( ) const

If true then logical structure of the file is copied when concatenation is performed.

◆ get_CopyOutlines()

bool Aspose::Pdf::Facades::PdfFileEditor::get_CopyOutlines ( ) const

If true then outlines will be copied.

◆ get_CorruptedFileAction()

PdfFileEditor::ConcatenateCorruptedFileAction Aspose::Pdf::Facades::PdfFileEditor::get_CorruptedFileAction ( ) const

This property defines behavior when concatenating process met corrupted file. Possible values are: StopWithError and ConcatenateIgnoringCorrupted.

◆ get_CorruptedItems()

System::ArrayPtr<System::SharedPtr<PdfFileEditor::CorruptedItem> > Aspose::Pdf::Facades::PdfFileEditor::get_CorruptedItems ( )

Array of encountered problems when concatenation was performed. For every corrupted document from passed to Concatenate() function new CorruptedItem entry is created. This property may be used only when CorruptedFileAction is ConcatenateIgnoringCorrupted.

//concatenate documents and show information about corrupted documents
pfe.CorruptedFileAction = PdfFileEditor.ConcatenateCorruptedFileActions.ConcatenateIgnoringCorrupted;
if (pfe.CorruptedItems.Length >0)
{
foreach(PdfFileEditor.CorruptedItem item in pfe.CorruptedItems)
{
Console.WriteLine(item.Index + " reason: " + item.Exception);
}
}

◆ get_IncrementalUpdates()

bool Aspose::Pdf::Facades::PdfFileEditor::get_IncrementalUpdates ( ) const

If true, incremental updates are made during concatenation.

◆ get_KeepActions()

bool Aspose::Pdf::Facades::PdfFileEditor::get_KeepActions ( ) const

If true actions will be copied from source documents. Defaulkt value : true.

◆ get_KeepFieldsUnique()

bool Aspose::Pdf::Facades::PdfFileEditor::get_KeepFieldsUnique ( ) const

If true then field names will be made unique when forms are concatenated. Suffixes will be added to field names, suffix template may be specified in UniqueSuffix property.

◆ get_LastException()

System::Exception Aspose::Pdf::Facades::PdfFileEditor::get_LastException ( ) const

Gets last occured exception. May be used to check the reason of failure when AllowconcatenateExceptions = false.

pfe.AllowConcatenateExceptions = false;
if (!pfe.Concatenate("file1.pdf", "file2.pdf", "file3.pdf"))
{
Console.WriteLine("Error occured:");
if (pfe.LastException != null)
{
Console.WriteLine(pfe.LastException.Message);
if (pfe.LastException.InnerException != null)
Console.WriteLine(pfe.LastException.InnerException.Message);
}
}

◆ get_MergeDuplicateLayers()

bool Aspose::Pdf::Facades::PdfFileEditor::get_MergeDuplicateLayers ( ) const

Optional contents of concatentated documents with equal names will be merged into one layer in resulstant document if this property is true. Else, layers with equal names will be save as different layers in resultant document.

◆ get_MergeDuplicateOutlines()

bool Aspose::Pdf::Facades::PdfFileEditor::get_MergeDuplicateOutlines ( ) const

If true, duplicate outlines are merged.

◆ get_OptimizeSize()

bool Aspose::Pdf::Facades::PdfFileEditor::get_OptimizeSize ( ) const

Gets optimization flag. 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_OwnerPassword()

System::String Aspose::Pdf::Facades::PdfFileEditor::get_OwnerPassword ( ) const

Sets owner's password if the source input Pdf file is encrypted. This property is not implemented yet.

◆ get_PreserveUserRights()

bool Aspose::Pdf::Facades::PdfFileEditor::get_PreserveUserRights ( ) const

If true, user rights of first document are applied to concatenated document. User rights of all other documents are ignored.

◆ get_SaveOptions()

System::SharedPtr<Aspose::Pdf::SaveOptions> Aspose::Pdf::Facades::PdfFileEditor::get_SaveOptions ( ) const

Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.

◆ get_UniqueSuffix()

System::String Aspose::Pdf::Facades::PdfFileEditor::get_UniqueSuffix ( ) const

Format of the suffix which is added to field name to make it unique when forms are concatenated. This string must contain NUM% substring which will be replaced with numbers. For example if UniqueSuffix = "ABC%NUM%" then for field "fieldName" names will be: fieldNameABC1, fieldNameABC2, fieldNameABC3 etc.

ed.UniqueSuffix = "_%NUM%";

◆ get_UseDiskBuffer()

bool Aspose::Pdf::Facades::PdfFileEditor::get_UseDiskBuffer ( )

If this option used then destination document will be saved on disk periodically and further concatenation will appllied to it as incremental updates.

◆ GetVentureLicense()

System::SharedPtr<Aspose::Pdf::LicenseManagement::VentureLicense> Aspose::Pdf::Facades::PdfFileEditor::GetVentureLicense ( )
virtual

◆ Insert() [1/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::String  inputFile,
int32_t  insertLocation,
System::String  portFile,
int32_t  startPage,
int32_t  endPage,
System::String  outputFile 
)

Inserts pages from an other file into the Pdf file at a position.

Parameters
inputFileInput Pdf file.
insertLocationPosition in input file.
portFileThe porting Pdf file.
startPageStart position in portFile.
endPageEnd position in portFile.
outputFileOutput Pdf file.
Returns
True for success, or false.
pfe.Insert("file1.pdf", 1, "file2.pdf", 2, 6, "out.pdf");

◆ Insert() [2/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  insertLocation,
System::SharedPtr< System::IO::Stream portStream,
int32_t  startPage,
int32_t  endPage,
System::SharedPtr< System::IO::Stream outputStream 
)

Inserts pages from an other file into the input Pdf file.

Parameters
inputStreamInput Stream of Pdf file.
insertLocationInsert position in input file.
portStreamStream of Pdf file for pages.
startPageFrom which page to start.
endPageTo which page to end.
outputStreamOutput Stream.
Returns
True for success, or false.
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream insertedStream = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Insert(sourceStream, 1, insertedStream, 2, 6, outStream);

◆ Insert() [3/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::String  inputFile,
int32_t  insertLocation,
System::String  portFile,
System::ArrayPtr< int32_t >  pageNumber,
System::String  outputFile 
)

Inserts pages from an other file into the input Pdf file.

Parameters
inputFileInput Pdf file.
insertLocationInsert position in input file.
portFilePages from the Pdf file.
pageNumberThe page number of the ported in portFile.
outputFileOutput Pdf file.
Returns
True for success, or false.
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream insertedStream = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Insert(sourceStream, 1, insertedStream, 2, 6, outStream);

◆ Insert() [4/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  insertLocation,
System::SharedPtr< System::IO::Stream portStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::IO::Stream outputStream 
)

Inserts pages from an other file into the input Pdf file.

Parameters
inputStreamInput Stream of Pdf file.
insertLocationInsert position in input file.
portStreamStream of Pdf file for pages.
pageNumberThe page number of the ported in portFile.
outputStreamOutput Stream.
Returns
True if operation was succeeded.
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream insertedStream = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Insert(sourceStream, 1, insertedStream, new int[] { 3, 4, 5}, outStream);

◆ Insert() [5/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::String  inputFile,
int32_t  insertLocation,
System::String  portFile,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Inserts contents of file into source file and stores result into HttpResponse object.

Parameters
inputFileSource file name.
insertLocationPage number where second file will be inserted.
portFilePath to file which will be inserted.
pageNumberArray of page numbers in source file wihich will be inserted.
responseResponse object where result will be stored.
Returns
true of inserting was successful.

◆ Insert() [6/6]

bool Aspose::Pdf::Facades::PdfFileEditor::Insert ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  insertLocation,
System::SharedPtr< System::IO::Stream portStream,
System::ArrayPtr< int32_t >  pageNumber,
System::SharedPtr< System::Web::HttpResponse response 
)

Inserts document into other document and stores result into response object.

Parameters
inputStreamStream with source document
insertLocationLocation where other document will be inserted.
portStreamDocument to be inserted.
pageNumberArray of page numbers in second document which will be inserted.
responseResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ MakeBooklet() [1/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::String  outputFile 
)

Makes booklet from the input file to output file.

Parameters
inputFileInput pdf file path and name.
outputFileOutput pdf file path and name.
Returns
boolean - True for success, or false.
pfe.MakeBooklet("input.pdf", "output.pdf");

◆ MakeBooklet() [2/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream 
)

Makes booklet from the InputStream to outputStream.

Parameters
inputStreamInput pdf stream.
outputStreamoutput pdf stream.
Returns
True if operation was succeeded.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeBooklet(inputStream, outputStream);

◆ MakeBooklet() [3/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::String  outputFile,
System::SharedPtr< PageSize pageSize 
)

Makes booklet from the inputFile to outputFile.

Parameters
inputFileInput pdf file path and name.
outputFileOutput pdf file path and name.
pageSizeThe page size of the output pdf file.
Returns
True if operation is succeeded.
pfe.MakeBooklet("input.pdf", "output.pdf", PageSize.A4);

◆ MakeBooklet() [4/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream,
System::SharedPtr< PageSize pageSize 
)

Makes booklet from the input stream and save result into output stream.

Parameters
inputStreamInput PDF stream.
outputStreamoutput pdf stream.
pageSizeThe page size of the output pdf file.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeBooklet(inputStream, outputStream, PageSize.A4);
Returns
True if operation was succeeded.

◆ MakeBooklet() [5/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::String  outputFile,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages 
)

Makes customized booklet from the firstInputFile to outputFile.

Parameters
inputFileThe input file.
outputFileOutput pdf file path and name.
leftPagesThe left pages of the booklet.
rightPagesThe right pages of the booklet.
Returns
boolean - True for success, or false.
pfe.MakeBooklet("input.pdf", "output.pdf", new int[] { 2, 4, 6 }, new int[] 1, 3, 5, 7 });

◆ MakeBooklet() [6/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages 
)

Makes customized booklet from the firstInputStream to outputStream.

Parameters
inputStreamThe input stream.
outputStreamoutput pdf stream.
leftPagesThe left pages.
rightPagesThe right pages.
Returns
boolean - True for success, or false.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeBooklet(inputStream, outputStream, new int[] { 2, 4, 6 }, new int[] 1, 3, 5, 7 });

◆ MakeBooklet() [7/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::String  outputFile,
System::SharedPtr< PageSize pageSize,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages 
)

Makes customized booklet from the firstInputFile to outputFile.

Parameters
inputFileThe input file.
outputFileOutput pdf file path and name.
pageSizeThe page size of the output pdf file.
leftPagesThe left pages.
rightPagesThe right pages.
Returns
boolean - True for success, or false.
pfe.MakeBooklet("input.pdf", "output.pdf", PageSize.A4, new int[] { 2, 4, 6 }, new int[] 1, 3, 5, 7 });

◆ MakeBooklet() [8/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream,
System::SharedPtr< PageSize pageSize,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages 
)

Makes booklet from the firstInputStream to outputStream.

Parameters
inputStreamThe input stream.
outputStreamoutput pdf stream.
pageSizeThe page size of the output pdf file.
leftPagesThe left pages.
rightPagesThe right pages.
Returns
boolean - True for success, or false.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeBooklet(inputStream, outputStream, PageSize.A4, new int[] { 2, 4, 6 }, new int[] 1, 3, 5, 7 });

◆ MakeBooklet() [9/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::SharedPtr< PageSize pageSize,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes booklet from source file and stores result into HttpResponse objects.

Parameters
inputFileSource file path.
pageSizeDesired page size.
leftPagesAray of page numbers to be placed in left.
rightPagesArray of page numbers to be placed in right.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ MakeBooklet() [10/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< PageSize pageSize,
System::ArrayPtr< int32_t >  leftPages,
System::ArrayPtr< int32_t >  rightPages,
System::SharedPtr< System::Web::HttpResponse response 
)

Make booklet from PDF file and stores it into HttpResponse.

Parameters
inputStreamInput document stream.
pageSizeDesired page size.
leftPagesArray of page numbers which will be placed in left.
rightPagesArray of page numbers which will b eplaced in right.
responseHttpResponse object.
Returns
True if operation was succeeded.

◆ MakeBooklet() [11/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::String  inputFile,
System::SharedPtr< PageSize pageSize,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes booklet from source file and stores result into HttpResponse objects.

Parameters
inputFileSource file path.
pageSizeDesired page size in output file.
responseHttpResponse object where result will be stored.
Returns
True if operation is succeeded.

◆ MakeBooklet() [12/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeBooklet ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< PageSize pageSize,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes booklet from source file and stores result into HttpResponse.

Parameters
inputStreamInput document stream.
pageSizeDesired page size in output file.
responseRespose object where resut will be saved.
Returns
true if booklet was built successfully.

◆ MakeNUp() [1/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::String  inputFile,
System::String  outputFile,
int32_t  x,
int32_t  y 
)

Makes N-Up document from the firstInputFile to outputFile.

Parameters
inputFileInput pdf file path and name.
outputFileOutput pdf file path and name.
xNumber of columns.
yNumber of rows.
Returns
boolean - True for success, or false.
pfe.MakeNUp("input.pdf", "output.pdf", 3, 3);

◆ MakeNUp() [2/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream,
int32_t  x,
int32_t  y 
)

Makes N-Up document from the input stream and saves result into output stream.

Parameters
inputStreamInput pdf stream.
outputStreamOutput pdf stream.
xNumber of columns.
yNumber of rows.
Returns
boolean - True for success, or false.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeNUp(inputStream, outputStream, 3, 3);

◆ MakeNUp() [3/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::IO::Stream outputStream,
int32_t  x,
int32_t  y,
System::SharedPtr< PageSize pageSize 
)

Makes N-Up document from the first input stream to output stream.

Parameters
inputStreamInput pdf stream.
outputStreamOutput pdf stream.
xNumber of columns.
yNumber of rows.
pageSizeThe page size of the output pdf file.
Returns
True if operation was succeeded.
Stream inputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeNUp(inputStream, outputStream, 3, 3, PageSize.A4);

◆ MakeNUp() [4/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::String  firstInputFile,
System::String  secondInputFile,
System::String  outputFile 
)

Makes N-Up document from the two input PDF files to outputFile. Each page of outputFile will contain two pages, one page is from the first input file and another is from the second input file. The two pages are piled up horizontally.

Parameters
firstInputFilefirst input file.
secondInputFilesecond input file.
outputFileOutput pdf file path and name.
Returns
boolean - True for success, or false.
pfe.MakeNUp("input1.pdf", "input2.pdf", "output.pdf");

◆ MakeNUp() [5/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::SharedPtr< System::IO::Stream firstInputStream,
System::SharedPtr< System::IO::Stream secondInputStream,
System::SharedPtr< System::IO::Stream outputStream 
)

Makes N-Up document from the two input PDF streams to outputStream.

Parameters
firstInputStreamfirst input stream.
secondInputStreamsecond input stream.
outputStreamOutput pdf stream.
Returns
boolean - True for success, or false.
Stream input1 = new FileStream("input1.pdf", FileMode.Open, FileAccess.Read);
Stream input2 = new FileStream("input2.pdf", FileMode.Open, FileAccess.Read);
Stream output = new FileStream("output.pdf");
pfe.MakeNUp(input1, input2, output);

◆ MakeNUp() [6/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::ArrayPtr< System::String inputFiles,
System::String  outputFile,
bool  isSidewise 
)

Makes N-Up document from the multi input PDF files to outputFile. Each page of outputFile will contain multi pages, which are combination with pages in the input files of the same page number. The multi pages piled up horizontally if isSidewise is true and piled up vertically if isSidewise is false.

Parameters
inputFilesInput Pdf files.
outputFileOutput pdf file path and name.
isSidewisePiled up way, true for horizontally and flase for vertically.
Returns
boolean - True for success, or false.
pfe.MakeNUp(new string[] { "input1.pdf", "input2.pdf", "input3.pdf" }, "output.pdf", false);

◆ MakeNUp() [7/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::ArrayPtr< System::SharedPtr< System::IO::Stream >>  inputStreams,
System::SharedPtr< System::IO::Stream outputStream,
bool  isSidewise 
)

Makes N-Up document from the multi input PDF streams to outputStream. Each page of outputStream will contain multi pages, which are combination with pages in the input streams of the same page number. The multi-pages piled up horizontally if isSidewise is true and piled up vertically if isSidewise is false.

Parameters
inputStreamsInput Pdf streams.
outputStreamOutput pdf stream.
Parameters
isSidewisePiled up way, true for horizontally and flase for vertically
Returns
boolean - True for success, or false.
Stream stream1 = new FileStream("input1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("input2.pdf", FileMode.Open, FileAccess.Read);
Stream stream3 = new FileStream("input3.pdf", FileMode.Open, FileAccess.Read);
Stream output = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.MakeNUp(new Stream[] { stream1, stream2, stream3 }, output, false);

◆ MakeNUp() [8/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::String  inputFile,
System::String  outputFile,
int32_t  x,
int32_t  y,
System::SharedPtr< PageSize pageSize 
)

Makes N-Up document from the input file to outputFile.

Parameters
inputFileInput pdf file path and name.
outputFileOutput pdf file path and name.
xNumber of columns.
yNumber of rows.
pageSizeThe page size of the output pdf file.
Returns
boolean - True for success, or false.
pfe.MakeNUp("input.pdf", "output.pdf", 3, 3, PageSize.A4);

◆ MakeNUp() [9/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  x,
int32_t  y,
System::SharedPtr< PageSize pageSize,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes N-up document and stores result into HttpResponse object.

Parameters
inputStreamStream of source document.
xNumber of columns.
yNumber of rows.
pageSizePage size in result file.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ MakeNUp() [10/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::String  inputFile,
int32_t  x,
int32_t  y,
System::SharedPtr< PageSize pageSize,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes N-up document and stores result into HttpResponse object.

Parameters
inputFilePath to source file.
xNumber of columns.
yNumber of rows.
pageSizePage size in result file.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ MakeNUp() [11/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::String  inputFile,
int32_t  x,
int32_t  y,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes N-up document and stores result into HttpResponse.

Parameters
inputFileSource file name.
xNumber of columns.
yNumber of rows.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ MakeNUp() [12/12]

bool Aspose::Pdf::Facades::PdfFileEditor::MakeNUp ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  x,
int32_t  y,
System::SharedPtr< System::Web::HttpResponse response 
)

Makes N-up document and stores result into HttpResponse.

Parameters
inputStreamStream of input document.
xNumber of columns.
yNumber of rows.
responseHttpResponse where result will be stored.
Returns
True if operation was succeeded.

◆ ResizeContents() [1/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< System::IO::Stream source,
System::SharedPtr< System::IO::Stream destination,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters 
)

Resizes contents of pages of the document.

Parameters
sourceStream with source document.
destinationStream with the destination document.
pagesArray of page indexes.
parametersResize parameters.
Returns
Returns true if success.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
//left margin = 10% of page width
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents width calculated automatically as width - left margin - right margin (100% - 10% - 10% = 80%)
null,
//right margin is 10% of page
PdfFileEditor.ContentsResizeValue.Percents(10),
//top margin = 10% of height
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents height is calculated automatically (similar to width)
null,
//bottom margin is 10%
PdfFileEditor.ContentsResizeValue.Percents(10)
);
fileEditor.ResizeContents(src, dest, new int[] { 1, 2,.3}, parameters);
dest.Close();

◆ ResizeContents() [2/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< System::IO::Stream source,
System::SharedPtr< System::IO::Stream destination,
System::ArrayPtr< int32_t >  pages,
double  newWidth,
double  newHeight 
)

Resizes contents of document pages. Shrinks contents of page and adds margins. New size of contents is specified in default space units.

Parameters
sourceStream which contains source document.
destinationStream where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
newWidthNew width of page contents in default space units.
newHeightNew height of page contents in default space units.
Returns
True if resize was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
fileEditor.ResizeContents(src, dest,
//resize all pages of document
null,
//new contents width = 200
200,
//new contents height = 300
300);
// rest area of page will be empty

◆ ResizeContents() [3/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::String  source,
System::String  destination,
System::ArrayPtr< int32_t >  pages,
double  newWidth,
double  newHeight 
)

Resizes contents of document pages. Shrinks contents of page and adds margins. New size of contents is specified in default space units.

Parameters
sourcePath to source document.
destinationPath where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
newWidthNew width of page contents in default space units.
newHeightNew height of page contents in default space units.
Returns
true if resize was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.ResizeContents("input.pdf", "output.pdf",
//resize all pages of document
null,
//new contents width = 200
200,
//new contents height = 300
300);
// rest area of page will be empty

◆ ResizeContents() [4/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::String  source,
System::String  destination,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters 
)

Resizes contents of pages in document. If page is shrinked blank margins are added around the page.

Parameters
sourceSource document path.
destinationDestination document path.
pagesArray of page indexes (page index starts from 1).
parametersParameters of page resize.
Returns
trure if resize was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
//left margin = 10% of page width
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents width calculated automatically as width - left margin - right margin (100% - 10% - 10% = 80%)
null,
//right margin is 10% of page
PdfFileEditor.ContentsResizeValue.Percents(10),
//top margin = 10% of height
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents height is calculated automatically (similar to width)
null,
//bottom margin is 10%
PdfFileEditor.ContentsResizeValue.Percents(10)
);
fileEditor.ResizeContents("input.pdf", "output.pdf", new int[] { 1, 2,.3}, parameters);

◆ ResizeContents() [5/9]

void Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< Document source,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters 
)

Resizes pages of document. Blank margins are added around of shrinked page.

Parameters
sourceSource document.
pagesList of page indexes.
parametersResize parameters.
PdfFileEditor fileEditor = new PdfFileEditor();
Document doc = new Document("input.pdf");
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
//left margin = 10% of page width
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents width calculated automatically as width - left margin - right margin (100% - 10% - 10% = 80%)
null,
//right margin is 10% of page
PdfFileEditor.ContentsResizeValue.Percents(10),
//top margin = 10% of height
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents height is calculated automatically (similar to width)
null,
//bottom margin is 10%
PdfFileEditor.ContentsResizeValue.Percents(10)
);
fileEditor.ResizeContents(doc, new int[] { 1, 2,.3}, parameters);
doc.Save("output.pdf");

◆ ResizeContents() [6/9]

void Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< Document source,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters 
)

Resizes pages of document. Blank margins are added around of shrinked page.

Parameters
sourceSource document.
parametersResize parameters.
PdfFileEditor fileEditor = new PdfFileEditor();
Document doc = new Document("input.pdf");
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
//left margin = 10% of page width
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents width calculated automatically as width - left margin - right margin (100% - 10% - 10% = 80%)
null,
//right margin is 10% of page
PdfFileEditor.ContentsResizeValue.Percents(10),
//top margin = 10% of height
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents height is calculated automatically (similar to width)
null,
//bottom margin is 10%
PdfFileEditor.ContentsResizeValue.Percents(10)
);
fileEditor.ResizeContents(doc, parameters);
doc.Save("output.pdf");

◆ ResizeContents() [7/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::String  source,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters,
System::SharedPtr< System::Web::HttpResponse response 
)

Resizes contents of pages in document. If page is shrinked blank margins are added around the page.Result is stored into HttpResponse object.

Parameters
sourcePath to source file.
pagesArray of pages to be resized.
parametersResize parameters.
responseHttpResponse object where result is saved.
Returns
True if operation was succeeded.

◆ ResizeContents() [8/9]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< System::IO::Stream source,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters,
System::SharedPtr< System::Web::HttpResponse response 
)

Resizes contents of pages in document. If page is shrinked blank margins are added around the page.Result is stored into HttpResponse object.

Parameters
sourceStream of source file.
pagesArray of pages to be resized.
parametersResize parameters.
responseHttpResponse object where result is saved.
Returns
True if operation was succeeded.

◆ ResizeContents() [9/9]

void Aspose::Pdf::Facades::PdfFileEditor::ResizeContents ( System::SharedPtr< Document source,
System::SharedPtr< Document dest,
System::ArrayPtr< int32_t >  pages,
System::SharedPtr< PdfFileEditor::ContentsResizeParameters parameters 
)
protected

Resizes pages of document. Blank margins are added around of shrinked page.

Parameters
sourceSource document.
destDestinalion document.
pagesList of page indexes.
parametersResize parameters.
PdfFileEditor fileEditor = new PdfFileEditor();
Document src = new Document("input.pdf");
Document dest = new Document();
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
//left margin = 10% of page width
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents width calculated automatically as width - left margin - right margin (100% - 10% - 10% = 80%)
null,
//right margin is 10% of page
PdfFileEditor.ContentsResizeValue.Percents(10),
//top margin = 10% of height
PdfFileEditor.ContentsResizeValue.Percents(10),
//new contents height is calculated automatically (similar to width)
null,
//bottom margin is 10%
PdfFileEditor.ContentsResizeValue.Percents(10)
);
fileEditor.ResizeContents(src, dest, new int[] { 1, 2,.3}, parameters);
dest.Save("output.pdf");

◆ ResizeContentsPct() [1/2]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContentsPct ( System::SharedPtr< System::IO::Stream source,
System::SharedPtr< System::IO::Stream destination,
System::ArrayPtr< int32_t >  pages,
double  newWidth,
double  newHeight 
)

Resizes contents of document pages. Shrinks contents of page and adds margins. New contents size is specified in percents.

Parameters
sourceStream which contains source document.
destinationStream where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
newWidthNew width of page contents in percents.
newHeightNew height of page contents in percetns.
Returns
true if resized sucessfully.
PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
fileEditor.ResizePct(src, dest,
//resize all pages of document
null,
//new contents width = 60% of initial size
60,
//new contents height = 60% of initial size
60);
// Rest area of page will be empty (page margins). Size of left and right margins is (100% - 60%) / 2 = 20%
// The same for top and bottom margins.

◆ ResizeContentsPct() [2/2]

bool Aspose::Pdf::Facades::PdfFileEditor::ResizeContentsPct ( System::String  source,
System::String  destination,
System::ArrayPtr< int32_t >  pages,
double  newWidth,
double  newHeight 
)

Resizes contents of document pages. Shrinks contents of page and adds margins. New contents size is specified in percents.

Parameters
sourcePath to source document.
destinationPath where resultant document will be saved.
pagesArray of page indexes. If null then all document pages will be processed.
newWidthNew width of page contents in percents.
newHeightNew height of page contents in percetns.
Returns
true if resize was successful.
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.ResizePct("input.pdf", "output.pdf",
//resize all pages of document
null,
//new contents width = 60% of initial size
60,
//new contents height = 60% of initial size
60);
// Rest area of page will be empty (page margins). Size of left and right margins is (100% - 60%) / 2 = 20%
// The same for top and bottom margins.

◆ set_AllowConcatenateExceptions()

void Aspose::Pdf::Facades::PdfFileEditor::set_AllowConcatenateExceptions ( bool  value)

If set to true, exceptions are thrown if error occured. Else excetion are not thrown and methods return false if failed.

pfe.AllowConcatenatedException = true;

◆ set_AttachmentName()

void Aspose::Pdf::Facades::PdfFileEditor::set_AttachmentName ( System::String  value)

Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.

◆ set_CloseConcatenatedStreams()

void Aspose::Pdf::Facades::PdfFileEditor::set_CloseConcatenatedStreams ( bool  value)

If set to true, streams are closed after operation.

pfe.CloseConcatenatedStreams = true;

◆ set_ConcatenationPacketSize()

void Aspose::Pdf::Facades::PdfFileEditor::set_ConcatenationPacketSize ( int32_t  value)

Number of documents concatenated before new incremental update was made during concatenation when UseDiskBuffer is set to true.

◆ set_ContentDisposition()

void Aspose::Pdf::Facades::PdfFileEditor::set_ContentDisposition ( Aspose::Pdf::ContentDisposition  value)

Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.

◆ set_ConvertTo()

void Aspose::Pdf::Facades::PdfFileEditor::set_ConvertTo ( PdfFormat  value)

Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion.

◆ set_CopyLogicalStructure()

void Aspose::Pdf::Facades::PdfFileEditor::set_CopyLogicalStructure ( bool  value)

If true then logical structure of the file is copied when concatenation is performed.

◆ set_CopyOutlines()

void Aspose::Pdf::Facades::PdfFileEditor::set_CopyOutlines ( bool  value)

If true then outlines will be copied.

◆ set_CorruptedFileAction()

void Aspose::Pdf::Facades::PdfFileEditor::set_CorruptedFileAction ( PdfFileEditor::ConcatenateCorruptedFileAction  value)

This property defines behavior when concatenating process met corrupted file. Possible values are: StopWithError and ConcatenateIgnoringCorrupted.

◆ set_IncrementalUpdates()

void Aspose::Pdf::Facades::PdfFileEditor::set_IncrementalUpdates ( bool  value)

If true, incremental updates are made during concatenation.

◆ set_KeepActions()

void Aspose::Pdf::Facades::PdfFileEditor::set_KeepActions ( bool  value)

If true actions will be copied from source documents. Defaulkt value : true.

◆ set_KeepFieldsUnique()

void Aspose::Pdf::Facades::PdfFileEditor::set_KeepFieldsUnique ( bool  value)

If true then field names will be made unique when forms are concatenated. Suffixes will be added to field names, suffix template may be specified in UniqueSuffix property.

◆ set_MergeDuplicateLayers()

void Aspose::Pdf::Facades::PdfFileEditor::set_MergeDuplicateLayers ( bool  value)

Optional contents of concatentated documents with equal names will be merged into one layer in resulstant document if this property is true. Else, layers with equal names will be save as different layers in resultant document.

◆ set_MergeDuplicateOutlines()

void Aspose::Pdf::Facades::PdfFileEditor::set_MergeDuplicateOutlines ( bool  value)

If true, duplicate outlines are merged.

◆ set_OptimizeSize()

void Aspose::Pdf::Facades::PdfFileEditor::set_OptimizeSize ( bool  value)

Sets optimization flag. 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_OwnerPassword()

void Aspose::Pdf::Facades::PdfFileEditor::set_OwnerPassword ( System::String  value)

Sets owner's password if the source input Pdf file is encrypted. This property is not implemented yet.

◆ set_PreserveUserRights()

void Aspose::Pdf::Facades::PdfFileEditor::set_PreserveUserRights ( bool  value)

If true, user rights of first document are applied to concatenated document. User rights of all other documents are ignored.

◆ set_SaveOptions()

void Aspose::Pdf::Facades::PdfFileEditor::set_SaveOptions ( System::SharedPtr< Aspose::Pdf::SaveOptions value)

Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.

◆ set_UniqueSuffix()

void Aspose::Pdf::Facades::PdfFileEditor::set_UniqueSuffix ( System::String  value)

Format of the suffix which is added to field name to make it unique when forms are concatenated. This string must contain NUM% substring which will be replaced with numbers. For example if UniqueSuffix = "ABC%NUM%" then for field "fieldName" names will be: fieldNameABC1, fieldNameABC2, fieldNameABC3 etc.

ed.UniqueSuffix = "_%NUM%";

◆ set_UseDiskBuffer()

void Aspose::Pdf::Facades::PdfFileEditor::set_UseDiskBuffer ( bool  value)

If this option used then destination document will be saved on disk periodically and further concatenation will appllied to it as incremental updates.

◆ SetVentureLicense()

void Aspose::Pdf::Facades::PdfFileEditor::SetVentureLicense ( System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense >  license)

◆ SplitFromFirst() [1/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitFromFirst ( System::String  inputFile,
int32_t  location,
System::String  outputFile 
)

Splits Pdf file from first page to specified location,and saves the front part as a new file.

Parameters
inputFileSource Pdf file.
locationThe splitting point.
outputFileOutput Pdf file.
Returns
True for success, or false.
pfe.SplitFromFirst("input.pdf", 5, "out.pdf");

◆ SplitFromFirst() [2/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitFromFirst ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  location,
System::SharedPtr< System::IO::Stream outputStream 
)

Splits from start to specified location,and saves the front part in output Stream.

Parameters
inputStreamSource Pdf file Stream.
locationThe splitting point.
outputStreamOutput file Stream.
Returns
True for success, or false.

The streams are NOT closed after this operation.

Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.SplitFromFirst(sourceStream, 5, outStream);

◆ SplitFromFirst() [3/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitFromFirst ( System::String  inputFile,
int32_t  location,
System::SharedPtr< System::Web::HttpResponse response 
)

Splits document from first page to location and saves result into HttpResponse objects.

Parameters
inputFileSource file name.
locationSplit point.
responseHttpResponse objects.
Returns
True if operation was succeeded.

◆ SplitFromFirst() [4/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitFromFirst ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  location,
System::SharedPtr< System::Web::HttpResponse response 
)

Splits document from start to specified location and stores result into HttpResponse object.

Parameters
inputStreamStream of source document.
locationThe splitting point.
responseHttpResponse object where result will be stored.
Returns
True if operation was succeeded.

◆ SplitToBulks() [1/2]

System::ArrayPtr<System::SharedPtr<System::IO::MemoryStream> > Aspose::Pdf::Facades::PdfFileEditor::SplitToBulks ( System::String  inputFile,
System::ArrayPtr< System::ArrayPtr< int32_t >>  numberOfPage 
)

Splits the Pdf file into several documents.The documents can be single-page or multi-pages.

Parameters
inputFileInput PDF file.
numberOfPageArray which contains array of double elements, which is start and end pages of document.
Returns
Output PDF streams, each stream buffers a PDF document.

◆ SplitToBulks() [2/2]

System::ArrayPtr<System::SharedPtr<System::IO::MemoryStream> > Aspose::Pdf::Facades::PdfFileEditor::SplitToBulks ( System::SharedPtr< System::IO::Stream inputStream,
System::ArrayPtr< System::ArrayPtr< int32_t >>  numberOfPage 
)

Splits the Pdf file into several documents.The documents can be single-page or multi-pages.

Parameters
inputStreamInput PDF stream.
numberOfPageThe start page and the end page of each document.
Returns
Output PDF streams, each stream buffers a PDF document.

◆ SplitToEnd() [1/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitToEnd ( System::String  inputFile,
int32_t  location,
System::String  outputFile 
)

Splits from location, and saves the rear part as a new file.

Parameters
inputFileSource Pdf file.
locationThe splitting position.
outputFileOutput Pdf file path.
Returns
True for success, or false.
pfe.SplitToEnd("input.pdf", 5, "out.pdf");

◆ SplitToEnd() [2/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitToEnd ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  location,
System::SharedPtr< System::IO::Stream outputStream 
)

Splits from specified location, and saves the rear part as a new file Stream.

Parameters
inputStreamSource Pdf file Stream.
locationThe splitting position.
outputStreamOutput Pdf file Stream.
Returns
True for success, or false.

The streams are NOT closed after this operation unless CloseConcatedStreams is specified.

Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.SplitToEnd(sourceStream, 5, outStream);

◆ SplitToEnd() [3/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitToEnd ( System::SharedPtr< System::IO::Stream inputStream,
int32_t  location,
System::SharedPtr< System::Web::HttpResponse response 
)

Splits from specified location, and saves the rear part into HttpResponse object.

Parameters
inputStreamSource document stream.
locationSplit point.
responseHttpResponse object.
Returns
true if splitting was successful.

◆ SplitToEnd() [4/4]

bool Aspose::Pdf::Facades::PdfFileEditor::SplitToEnd ( System::String  inputFile,
int32_t  location,
System::SharedPtr< System::Web::HttpResponse response 
)

Splits from specified location, and saves the rear part into HttpResponse object.

Parameters
inputFilesource file name.
locationSplit point.
responseHttpResponse objects.
Returns
True if operation was succeeded.

◆ SplitToPages() [1/4]

System::ArrayPtr<System::SharedPtr<System::IO::MemoryStream> > Aspose::Pdf::Facades::PdfFileEditor::SplitToPages ( System::String  inputFile)

Splits the PDF file into single-page documents.

Parameters
inputFileInput PDF file name.
Returns
Output PDF streams, each stream buffers a single-page PDF document.

◆ SplitToPages() [2/4]

System::ArrayPtr<System::SharedPtr<System::IO::MemoryStream> > Aspose::Pdf::Facades::PdfFileEditor::SplitToPages ( System::SharedPtr< System::IO::Stream inputStream)

Splits the Pdf file into single-page documents.

Parameters
inputStreamInput Pdf stream.
Returns
Array of memory streams which contain pages of the document.

◆ SplitToPages() [3/4]

void Aspose::Pdf::Facades::PdfFileEditor::SplitToPages ( System::String  inputFile,
System::String  fileNameTemplate 
)

Split the Pdf file into single-page documents and saves it into specified path. Path is specifield by field name temaplate.

Parameters
inputFileInput file name.
fileNameTemplateTemplate of resultant file name. Must contain NUM% which is replaced with page number. For example, if c:/dir/pageNUM%.pdf is specified, resultant files will have the following names: c:/dir/page1.pdf, c:/dir/page2.pdf etc.

◆ SplitToPages() [4/4]

void Aspose::Pdf::Facades::PdfFileEditor::SplitToPages ( System::SharedPtr< System::IO::Stream inputStream,
System::String  fileNameTemplate 
)

Split the Pdf file into single-page documents and saves it into specified path. Path is specifield by field name temaplate.

Parameters
inputStreamStream of the soruce document.
fileNameTemplateTemplate of resultant file name. Must contain NUM% which is replaced with page number. For example, if c:/dir/pageNUM%.pdf is specified, resultant files will have the following names: c:/dir/page1.pdf, c:/dir/page2.pdf etc.

Member Data Documentation

◆ E_EMPTY_PAGE_RANGE

const System::String Aspose::Pdf::Facades::PdfFileEditor::E_EMPTY_PAGE_RANGE
staticprotected

◆ E_SMALL_PAGE_RANGE

const System::String Aspose::Pdf::Facades::PdfFileEditor::E_SMALL_PAGE_RANGE
staticprotected

◆ E_WRONG_PAGE_RANGE

const System::String Aspose::Pdf::Facades::PdfFileEditor::E_WRONG_PAGE_RANGE
staticprotected