Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Redorder articles
Articles related to PdfFormatProvider moved to a separate folder
  • Loading branch information
TanyaDimitrova committed Jan 11, 2017
commit ea7d9ff88566bb9c426875e7788eef26768eccce
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ The API of PDF Stream Processing helps you achieve the following scenarios when

- Merge and position content from existing PDF pages and generated RadFixedPage instances onto a single page in the newly written PDF file stream.

>In addition to the high performance and low memory footprint, when using PdfStreamWriter, you can rely that the new API will preserve unmodified the existing PDF pages without losing any existing content.

## PDF Stream Processing Structure

Expand All @@ -57,7 +56,7 @@ There are several classes responsible for writing the different parts of a PDF f

RadPdfProcessing provides two options for import and export - using PDF Stream Processing and through the PdfFormatProvider class. This section describes the benefits of the two approaches in different scenarios.

If you need to import a PDF document in order to add content to it and save it back, you can take advantage of the PDF Stream Processing mechanism. Choosing this approach, you will gain a great performance with minimal memory usage as well as a warranty that the existing content will be preserved no matter of the PDF features used in your document.
If you need to import a PDF document in order to add content to it and save it back, you can take advantage of the PDF Stream Processing mechanism. Choosing this approach, you will gain a great performance with minimal memory usage as well as support for the majority of the PDF format features.

>An important thing to note is that, due to its specifics, PDF Stream Processing doesn't support encrypted documents. If your document is using some sort of encryption, you should work with PdfFormatProvider. When such a document is passed to PDF Stream Processing, the PdfFileSource class throws a NotSupportedEncryptionException to notify you.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ position: 1

# Overview

The PdfStreamWriter class enables you to write file content directly to a Stream. This is the root element of the Pdf Stream Processing functionality.
The PdfStreamWriter class enables you to write file content directly to a Stream. This is the root element of the Pdf Stream Processing functionality used when exporting a PDF document.

## Create a PdfStreamWriter Instance


To create an object of type PdfSteamWriter, you should pass it the Stream of the file, which you would like to work with, as a constructor parameter.



>PdfStreamWriter inherits from [IDisposable](https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx). Make sure the object is disposed when you are done with it. Otherwise, the content might not be written in the exported file. The best way to ensure this is handled properly is to wrap it in a using statement.

#### **Example 1: Instantiate PdfStreamWriter**

{{region}}
Expand All @@ -31,7 +26,9 @@ To create an object of type PdfSteamWriter, you should pass it the Stream of the
}
{{endregion}}

PdfStreamWriter exposes also an additional overload, which allows you to leave the stream you are working with open by passing **true** as a value for its second parameter (leaveStreamOpen).
PdfStreamWriter exposes also an additional overload, which allows you to keep the stream you are working with open after disposing the writer instance by passing **true** as a value for the second constructor parameter (leaveStreamOpen).

>PdfStreamWriter inherits from [IDisposable](https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx). Make sure the object is disposed when you are done with it. Otherwise, the content might not be written in the exported file. The best way to ensure this is handled properly is to wrap it in a using statement.

## PdfStreamWriter Members

Expand Down