PdfFileEditor.TrySplitToEnd
TrySplitToEnd(string, int, string)
Splits from location, and saves the rear part as a new file.
public bool TrySplitToEnd(string inputFile, int location, string outputFile)
Parameter | Type | Description |
---|---|---|
inputFile | String | Source Pdf file. |
location | Int32 | The splitting position. |
outputFile | String | Output Pdf file path. |
Return Value
True for success, or false.
Remarks
The TrySplitToEnd method is like the SplitToEnd method, except the TrySplitToEnd method does not throw an exception if the operation fails.
Examples
PdfFileEditor pfe = new PdfFileEditor();
bool result = pfe.TrySplitToEnd("input.pdf", 5, "out.pdf");
See Also
- class PdfFileEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
TrySplitToEnd(Stream, int, Stream)
Splits from specified location, and saves the rear part as a new file Stream.
public bool TrySplitToEnd(Stream inputStream, int location, Stream outputStream)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | Source Pdf file Stream. |
location | Int32 | The splitting position. |
outputStream | Stream | Output Pdf file Stream. |
Return Value
True for success, or false.
Remarks
The streams are NOT closed after this operation unless CloseConcatedStreams is specified. The TrySplitToEnd method is like the SplitToEnd method, except the TrySplitToEnd method does not throw an exception if the operation fails.
Examples
PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
bool result = pfe.TrySplitToEnd(sourceStream, 5, outStream);
See Also
- class PdfFileEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
TrySplitToEnd(Stream, int, HttpResponse)
Splits from specified location, and saves the rear part into HttpResponse object.
public bool TrySplitToEnd(Stream inputStream, int location, HttpResponse response)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | Source document stream. |
location | Int32 | Split point. |
response | HttpResponse | HttpResponse object. |
Return Value
true if operation completed successfully; otherwise, false.
Remarks
The TrySplitToEnd method is like the SplitToEnd method, except the TrySplitToEnd method does not throw an exception if the operation fails.
See Also
- class PdfFileEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
TrySplitToEnd(string, int, HttpResponse)
Splits from specified location, and saves the rear part into HttpResponse object.
public bool TrySplitToEnd(string inputFile, int location, HttpResponse response)
Parameter | Type | Description |
---|---|---|
inputFile | String | source file name. |
location | Int32 | Split point. |
response | HttpResponse | HttpResponse objects. |
Return Value
true if operation completed successfully; otherwise, false.
Remarks
The TrySplitToEnd method is like the SplitToEnd method, except the TrySplitToEnd method does not throw an exception if the operation fails.
See Also
- class PdfFileEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF