Pular para o conteúdo principal

PdfMarker

Namespace: Lacuna.Pki.Pdf
Assembly: Lacuna.Pki
Class

public class PdfMarker

Hierarquia: objectPdfMarker

Construtores

PdfMarker()

public PdfMarker()

Propriedades

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.

public PdfPageTemplate NewPagesTemplate { get; set; }

Retorno

PdfPageTemplate


PreserveSignaturesVisualRepresentation

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

public bool PreserveSignaturesVisualRepresentation { get; set; }

Retorno

bool


ThrowIfSignedPdf

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

public bool ThrowIfSignedPdf { get; set; }

Retorno

bool


Métodos

AddMark(PdfMark)

public void AddMark(PdfMark mark)

Parâmetros

NomeTipoDescrição
markPdfMark

AddMarkRange(IEnumerable<PdfMark>)

public void AddMarkRange(IEnumerable<PdfMark> marks)

Parâmetros

NomeTipoDescrição
marksIEnumerable<PdfMark>

AddMetadata(string, string)

public void AddMetadata(string key, string value)

Parâmetros

NomeTipoDescrição
keystring
valuestring

ComputeRequiredArea(Context, PdfMark, IEnumerable<PdfTextSection>, PadesVisualRectangle, PdfMarkRotation, double?)

Computes the required area which can fit the text in

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

Parâmetros

NomeTipoDescrição
contextPdfMarker.ContextA current PDF to mark context from method CreateContext
markPdfMarkThe text PDF mark parent
textSectionsIEnumerable<PdfTextSection>The text in sections
textRelativeMaxWidthPadesVisualRectangleThe text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters
textRotationPdfMarkRotationThe text rotation inside the container, if any
lineSpacingdouble?The line spacing multiplier based on the font size

Retorno

TextRequiredArea


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

Computes the required area which can fit the text in

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

Parâmetros

NomeTipoDescrição
contextPdfMarker.ContextA current PDF to mark context from method CreateContext
markPdfMarkThe text PDF mark parent
textSectionsIEnumerable<PdfTextSection>The text in sections
textRelativeMaxWidthPadesVisualRectangleThe text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters
textRotationPdfMarkRotationThe text rotation inside the container, if any

Retorno

TextRequiredArea


ComputeRequiredArea(Context, PdfMark, PdfMarkText)

Computes the required area which can fit the text in

public TextRequiredArea ComputeRequiredArea(PdfMarker.Context context, PdfMark mark, PdfMarkText markText)

Parâmetros

NomeTipoDescrição
contextPdfMarker.ContextA current PDF to mark context from method CreateContext
markPdfMarkThe text PDF mark parent
markTextPdfMarkTextThe text parameters

Retorno

TextRequiredArea


CreateContext(byte[])

Creates a previous context with the PDF which will be marked

public PdfMarker.Context CreateContext(byte[] pdf)

Parâmetros

NomeTipoDescrição
pdfbyte[]The PDF to be marked

Retorno

PdfMarker.Context


CreateContext(Stream)

Creates a previous context with the PDF which will be marked

public PdfMarker.Context CreateContext(Stream pdf)

Parâmetros

NomeTipoDescrição
pdfStreamThe PDF to be marked

Retorno

PdfMarker.Context


SetFormField(string, string)

public void SetFormField(string name, string value)

Parâmetros

NomeTipoDescrição
namestring
valuestring

SetPageContentScale(PdfPageContentScale)

public void SetPageContentScale(PdfPageContentScale scaleParameters)

Parâmetros

NomeTipoDescrição
scaleParametersPdfPageContentScale

WriteMarks(byte[])

Writes marks to a PDF

public byte[] WriteMarks(byte[] pdf)

Parâmetros

NomeTipoDescrição
pdfbyte[]The PDF file content to be marked

Retorno

byte[] — PDF content withs marks


WriteMarks(Context, Stream)

Writes marks to a PDF

public void WriteMarks(PdfMarker.Context context, Stream output)

Parâmetros

NomeTipoDescrição
contextPdfMarker.ContextA previously created Context through method CreateContext and the PDF to be marked
outputStreamPDF with marks

WriteMarks(Context)

Writes marks to a PDF

public byte[] WriteMarks(PdfMarker.Context context)

Parâmetros

NomeTipoDescrição
contextPdfMarker.ContextA previously created Context through method CreateContext and the PDF to be marked

Retorno

byte[]


WriteMarks(Stream, Stream)

Writes marks to a PDF

public void WriteMarks(Stream pdf, Stream output)

Parâmetros

NomeTipoDescrição
pdfStreamThe PDF to be marked
outputStreamPDF with marks

Membros herdados

ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()