PdfMarker
Namespace: Lacuna.Pki.Pdf
Assembly: Lacuna.Pki
Class
public class PdfMarker
Hierarquia: object → PdfMarker
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
PreserveSignaturesVisualRepresentation
Whether or not to preserve images of signatures visual representations on the PDF, when present.
public bool PreserveSignaturesVisualRepresentation { get; set; }
Retorno
ThrowIfSignedPdf
Throws SignedPdfToMarkException if the PDF has any signature. Default is true.
public bool ThrowIfSignedPdf { get; set; }
Retorno
Métodos
AddMark(PdfMark)
public void AddMark(PdfMark mark)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
mark | PdfMark |
AddMarkRange(IEnumerable<PdfMark>)
public void AddMarkRange(IEnumerable<PdfMark> marks)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
marks | IEnumerable<PdfMark> |
AddMetadata(string, string)
public void AddMetadata(string key, string value)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
key | string | |
value | string |
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
| Nome | Tipo | Descrição |
|---|---|---|
context | PdfMarker.Context | A current PDF to mark context from method CreateContext |
mark | PdfMark | The text PDF mark parent |
textSections | IEnumerable<PdfTextSection> | The text in sections |
textRelativeMaxWidth | PadesVisualRectangle | The text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters |
textRotation | PdfMarkRotation | The text rotation inside the container, if any |
lineSpacing | double? | The line spacing multiplier based on the font size |
Retorno
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
| Nome | Tipo | Descrição |
|---|---|---|
context | PdfMarker.Context | A current PDF to mark context from method CreateContext |
mark | PdfMark | The text PDF mark parent |
textSections | IEnumerable<PdfTextSection> | The text in sections |
textRelativeMaxWidth | PadesVisualRectangle | The text relative max width dimensions. Only needed any two of (Left, Right, Width) parameters |
textRotation | PdfMarkRotation | The text rotation inside the container, if any |
Retorno
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
| Nome | Tipo | Descrição |
|---|---|---|
context | PdfMarker.Context | A current PDF to mark context from method CreateContext |
mark | PdfMark | The text PDF mark parent |
markText | PdfMarkText | The text parameters |
Retorno
CreateContext(byte[])
Creates a previous context with the PDF which will be marked
public PdfMarker.Context CreateContext(byte[] pdf)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pdf | byte[] | The PDF to be marked |
Retorno
CreateContext(Stream)
Creates a previous context with the PDF which will be marked
public PdfMarker.Context CreateContext(Stream pdf)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pdf | Stream | The PDF to be marked |
Retorno
SetFormField(string, string)
public void SetFormField(string name, string value)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
name | string | |
value | string |
SetPageContentScale(PdfPageContentScale)
public void SetPageContentScale(PdfPageContentScale scaleParameters)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
scaleParameters | PdfPageContentScale |
WriteMarks(byte[])
Writes marks to a PDF
public byte[] WriteMarks(byte[] pdf)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pdf | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
context | PdfMarker.Context | A previously created Context through method CreateContext and the PDF to be marked |
output | Stream | PDF with marks |
WriteMarks(Context)
Writes marks to a PDF
public byte[] WriteMarks(PdfMarker.Context context)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
context | PdfMarker.Context | A previously created Context through method CreateContext and the PDF to be marked |
Retorno
WriteMarks(Stream, Stream)
Writes marks to a PDF
public void WriteMarks(Stream pdf, Stream output)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pdf | Stream | The PDF to be marked |
output | Stream | PDF with marks |
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()