Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions File-Formats/PDF/Split-Documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Refer to the following code example to split a range of pages.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
{% raw %}

//Load the existing PDF file.
PdfLoadedDocument loadDocument = new PdfLoadedDocument(new FileStream("Input.pdf", FileMode.Open));
//Subscribe to the document split event.
Expand All @@ -98,10 +100,13 @@ loadDocument.SplitByRanges(new int[,] { { 0, 5 }, { 5, 10 } });
//Close the document.
loadDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
{% raw %}

//Create the values.
int[,] values = new int[,] { { 2, 5 }, { 8, 10 } };
//Load the PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
Expand All @@ -112,10 +117,14 @@ loadedDocument.SplitByRanges(destinationFilePattern, values);
//close the document
loadedDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
{% raw %}

'Create the values.
Dim values As Integer(,) = New Integer(,) {{2, 5},{8, 10}}
'Load the PDF document.
Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
'Set a output path
Expand All @@ -125,6 +134,7 @@ loadedDocument.SplitByRanges(destinationFilePattern, values)
'Close the document.
loadedDocument.Close(True)

{% endraw %}
{% endhighlight %}

{% endtabs %}
Expand Down Expand Up @@ -301,6 +311,7 @@ The Syncfusion PDF library enables the splitting of PDF documents and offers the
{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]" %}
{% raw %}

//Load the existing PDF file.
PdfLoadedDocument loadDocument = new PdfLoadedDocument(new FileStream("Input.pdf", FileMode.Open));
Expand All @@ -322,9 +333,11 @@ loadDocument.SplitByRanges(new int[,] { { 0, 5 }, { 5, 10 } }, splitOptions);
//Close the document.
loadDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
{% raw %}

//Create the values.
int[,] values = new int[,] { { 2, 5 }, { 8, 10 } };
Expand All @@ -341,9 +354,11 @@ loadedDocument.SplitByRanges(destinationFilePattern, values, splitOptions);
//Close the document.
loadedDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
{% raw %}

'Create the values.
Dim values As Integer(,) = New Integer(,) {{2, 5},{8, 10}}
Expand All @@ -361,6 +376,7 @@ loadedDocument.SplitByRanges(destinationFilePattern, values, splitOptions)
'Close the document.
loadedDocument.Close(True)

{% endraw %}
{% endhighlight %}

{% endtabs %}
Expand All @@ -375,6 +391,7 @@ The Syncfusion PDF library enables the splitting of PDF documents and offers the
{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]" %}
{% raw %}

//Load an existing PDF file.
PdfLoadedDocument loadDocument = new PdfLoadedDocument(new FileStream("Input.pdf", FileMode.Open));
Expand All @@ -397,9 +414,11 @@ loadDocument.SplitByRanges(new int[,] { { 0, 1 }, { 1, 2 } }, splitOptions);
//Close the document.
loadDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
{% raw %}

//Create the values.
int[,] values = new int[,] { { 0, 1 }, { 1, 2 } };
Expand All @@ -417,9 +436,11 @@ loadedDocument.SplitByRanges(destinationFilePattern, values, splitOptions);
//Close the document.
loadedDocument.Close(true);

{% endraw %}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
{% raw %}

'Create the values.
Dim values As Integer(,) = New Integer(,) {{0, 1},{1, 2}}
Expand All @@ -437,6 +458,7 @@ loadedDocument.SplitByRanges(destinationFilePattern, values, splitOptions)
'Close the document.
loadedDocument.Close(True)

{% endraw %}
{% endhighlight %}

{% endtabs %}
Expand Down