Show / Hide Table of Contents

Class PdfMarker

Inheritance
Object
PdfMarker
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki.Pdf
Assembly: Lacuna.Pki.dll
Syntax
public class PdfMarker

Constructors

PdfMarker()

Declaration
public PdfMarker()

Properties

NewPagesTemplate

A page size and orientation template for creating new pages on the PDF. If not set, the current PDF pages most common paper size portrait will be used as template.

Declaration
public PdfPageTemplate NewPagesTemplate { get; set; }
Property Value
Type Description
PdfPageTemplate

PreserveSignaturesVisualRepresentation

Whether or not to preserve images of signatures visual representations on the PDF, when present.

Declaration
public bool PreserveSignaturesVisualRepresentation { get; set; }
Property Value
Type Description
Boolean

ThrowIfSignedPdf

Throws SignedPdfToMarkException if the PDF has any signature. Default is true.

Declaration
public bool ThrowIfSignedPdf { get; set; }
Property Value
Type Description
Boolean

Methods

AddMark(PdfMark)

Declaration
public void AddMark(PdfMark mark)
Parameters
Type Name Description
PdfMark mark

AddMarkRange(IEnumerable<PdfMark>)

Declaration
public void AddMarkRange(IEnumerable<PdfMark> marks)
Parameters
Type Name Description
IEnumerable<PdfMark> marks

AddMetadata(String, String)

Declaration
public void AddMetadata(string key, string value)
Parameters
Type Name Description
String key
String value

ComputeRequiredArea(PdfMarker.Context, PdfMark, PdfMarkText)

Computes the required area which can fit the text in

Declaration
public TextRequiredArea ComputeRequiredArea(PdfMarker.Context context, PdfMark mark, PdfMarkText markText)
Parameters
Type Name Description
PdfMarker.Context context

A current PDF to mark context from method CreateContext

PdfMark mark

The text PDF mark parent

PdfMarkText markText

The text parameters

Returns
Type Description
TextRequiredArea

ComputeRequiredArea(PdfMarker.Context, PdfMark, IEnumerable<PdfTextSection>, PadesVisualRectangle, PdfMarkRotation)

Computes the required area which can fit the text in

Declaration
public TextRequiredArea ComputeRequiredArea(PdfMarker.Context context, PdfMark mark, IEnumerable<PdfTextSection> textSections, PadesVisualRectangle textRelativeMaxWidth = null, PdfMarkRotation textRotation = PdfMarkRotation.D0)
Parameters
Type Name Description
PdfMarker.Context context

A current PDF to mark context from method CreateContext

PdfMark mark

The text PDF mark parent

IEnumerable<PdfTextSection> textSections

The text in sections

PadesVisualRectangle textRelativeMaxWidth

The text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters

PdfMarkRotation textRotation

The text rotation inside the container, if any

Returns
Type Description
TextRequiredArea

ComputeRequiredArea(PdfMarker.Context, PdfMark, IEnumerable<PdfTextSection>, PadesVisualRectangle, PdfMarkRotation, Nullable<Double>)

Computes the required area which can fit the text in

Declaration
public TextRequiredArea ComputeRequiredArea(PdfMarker.Context context, PdfMark mark, IEnumerable<PdfTextSection> textSections, PadesVisualRectangle textRelativeMaxWidth = null, PdfMarkRotation textRotation = PdfMarkRotation.D0, double? lineSpacing = default(double? ))
Parameters
Type Name Description
PdfMarker.Context context

A current PDF to mark context from method CreateContext

PdfMark mark

The text PDF mark parent

IEnumerable<PdfTextSection> textSections

The text in sections

PadesVisualRectangle textRelativeMaxWidth

The text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters

PdfMarkRotation textRotation

The text rotation inside the container, if any

Nullable<Double> lineSpacing

The line spacing multiplier based on the font size

Returns
Type Description
TextRequiredArea

CreateContext(Byte[])

Creates a previous context with the PDF which will be marked

Declaration
public PdfMarker.Context CreateContext(byte[] pdf)
Parameters
Type Name Description
Byte[] pdf

The PDF to be marked

Returns
Type Description
PdfMarker.Context

CreateContext(Stream)

Creates a previous context with the PDF which will be marked

Declaration
public PdfMarker.Context CreateContext(Stream pdf)
Parameters
Type Name Description
Stream pdf

The PDF to be marked

Returns
Type Description
PdfMarker.Context

SetFormField(String, String)

Declaration
public void SetFormField(string name, string value)
Parameters
Type Name Description
String name
String value

SetPageContentScale(PdfPageContentScale)

Declaration
public void SetPageContentScale(PdfPageContentScale scaleParameters)
Parameters
Type Name Description
PdfPageContentScale scaleParameters

WriteMarks(PdfMarker.Context)

Writes marks to a PDF

Declaration
public byte[] WriteMarks(PdfMarker.Context context)
Parameters
Type Name Description
PdfMarker.Context context

A previously created Context through method CreateContext and the PDF to be marked

Returns
Type Description
Byte[]

WriteMarks(PdfMarker.Context, Stream)

Writes marks to a PDF

Declaration
public void WriteMarks(PdfMarker.Context context, Stream output)
Parameters
Type Name Description
PdfMarker.Context context

A previously created Context through method CreateContext and the PDF to be marked

Stream output

PDF with marks

WriteMarks(Byte[])

Writes marks to a PDF

Declaration
public byte[] WriteMarks(byte[] pdf)
Parameters
Type Name Description
Byte[] pdf

The PDF file content to be marked

Returns
Type Description
Byte[]

PDF content withs marks

WriteMarks(Stream, Stream)

Writes marks to a PDF

Declaration
public void WriteMarks(Stream pdf, Stream output)
Parameters
Type Name Description
Stream pdf

The PDF to be marked

Stream output

PDF with marks

Back to top Copyright © 2015-2020 Lacuna Software