Click or drag to resize

PdfAnnotationDataConverterExportToPdfDocumentSigner Method

Exports a multiple pages of annotations to PdfDocumentSigner.
Examples
In the following example, annotations are exported to PdfDocumentSigner.
ExportAnnotationsToPdfDocumentSignerExample
var rectData = new RectangleData()
{
    Size = new SizeF(123, 345),
    Location = new PointF(123, 321),
    Fill = new AnnotationBrush(Color.FromArgb(255, 64, 128, 255)),
    Outline = new AnnotationPen(Color.FromArgb(255, 128, 128, 128))
};
var polyData = new PolygonData()
{
    Size = new SizeF(100, 200),
    Location = new PointF(10, 11),
    Fill = new AnnotationBrush(Color.FromArgb(255, 64, 128, 255)),
    Outline = new AnnotationPen(Color.FromArgb(255, 128, 128, 128))
};
polyData.Points.AddRange(new[] { new PointF(1, 1), new PointF(50, 50), new PointF(1, 50) });


var collection = new AnnotationDataCollection() { new LayerData() { Items = { rectData, polyData } } };
var dpis = new[] { new Dpi(96, 96, ResolutionUnit.DotsPerInch) };
var signer = new PdfDocumentSigner(pdfStream, null);

PdfAnnotationDataConverter.ExportToPdfDocumentSigner(collection, AnnotationUnit.Pixel, dpis, signer);

signer.AppendChangesFinal(true);

Namespace:  Atalasoft.dotImage.PdfDoc.Bridge.Annotate
Assembly:  Atalasoft.dotImage.PdfDoc.Bridge (in Atalasoft.dotImage.PdfDoc.Bridge.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public static void ExportToPdfDocumentSigner(
	AnnotationDataCollection layers,
	AnnotationUnit units,
	Dpi[] resolutions,
	PdfDocumentSigner signer,
	PdfUnknownAnnotationHandler handler = null
)

Parameters

layers
Type: Atalasoft.AnnotateAnnotationDataCollection
A collection of pages of annotations.
units
Type: Atalasoft.AnnotateAnnotationUnit
An array of units in which the page sizes are expressed.
resolutions
Type: Atalasoft.ImagingDpi
An array of resolutions of the pages.
signer
Type: Atalasoft.PdfDoc.DigitalSignaturesPdfDocumentSigner
The original source stream for the document.
handler (Optional)
Type: Atalasoft.Annotate.ExportersPdfUnknownAnnotationHandler
The handler for unknown annotation type.
Remarks
To create a page with no annotations, add an empty LayerData to the collection.
See Also