Zum Inhalt springen
NexPDF

API-Referenz

Jede Klasse, Methode und Funktion des NexPDF-.NET-SDK, nach Funktion gruppiert. Erzeugt aus NexPDF 1.1.0.

Deutsch

Erzeugt aus NexPDF 1.1.0

Diese Seite wird aus dem Quellcode von Nexdevit.NexPdf erzeugt. Sie listet 207 Member auf. Optionen und Ergebnisse, die JSON-Strings sind, verwenden in jedem NexPDF-SDK dasselbe JSON. Modul ist das Lizenzmodul, das ein Aufruf braucht; Aufrufe mit „immer verfügbar“ funktionieren ohne Lizenzschlüssel.

Einrichtung und Lebenszyklus

ActivateLicense

public static int ActivateLicense(string keyOrXml, string platform, string appId)

Aktiviert einen Lizenzschlüssel oder eine license.xml einmal pro Prozess. Liefert 2 (lizenziert) oder 1 (Test) und löst andernfalls NexPdfException mit dem negativen NexPdfException.Code aus. Ohne Lizenz ist das SDK nur zur Ansicht nutzbar, und gerenderte Seiten tragen ein Wasserzeichen.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_license_activate

IsLicensed

public static bool IsLicensed(string module)

Ob die aktive Lizenz module freischaltet (annotations, forms, editor, security, redaction, signatures, conversion, ocr, standards).

Auf NexPdfSdk (static)

Platforms

public static readonly string[] Platforms

Plattformen, an die eine Lizenz gebunden werden kann.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_version

Version

public static string Version

Die Version der Engine.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_version

LastError

public static string? LastError

Der letzte Fehler in diesem Thread oder null.

Auf NexPdfSdk (static)

OpenBytes

public static NexPdfDocument OpenBytes(byte[] data, string? password = null)

Öffnet ein PDF (oder ein JPEG-/PNG-/TIFF-Bild) aus Bytes; Word-, Excel- und PowerPoint-Dateien, EPUB-/FictionBook-/XPS-Bücher und CBZ-Comics werden konvertiert. password öffnet verschlüsselte Dateien.

Auf NexPdfDocument · immer verfügbar · C nexpdf_open_bytes

Open

public static NexPdfDocument Open(string path, string? password = null)

Öffnet eine Datei; siehe OpenBytes.

Auf NexPdfDocument

FromHtml

public static NexPdfDocument FromHtml(string html)

HTML in ein neues PDF (Modul: conversion).

Auf NexPdfDocument

OpenOffice

public static NexPdfDocument OpenOffice(byte[] data)

Word / Excel / PowerPoint in ein neues PDF (Modul: conversion).

Auf NexPdfDocument

OpenEbook

public static NexPdfDocument OpenEbook(byte[] data)

EPUB, FictionBook, XPS/OpenXPS oder CBZ in ein neues PDF (Modul: conversion).

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_count

OpenImage

public static NexPdfDocument OpenImage(byte[] data)

JPEG / PNG / TIFF in ein neues PDF, eine Seite pro Bild.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_count

OpenBytesWithPassword

public static NexPdfDocument OpenBytesWithPassword(byte[] data, string password)

Anzahl der Seiten.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_count

Save

public void Save(string path, bool linearized = false)

Schreibt das Dokument; linearized schreibt eine „Fast Web View“-Datei.

Auf NexPdfDocument

Copy

public NexPdfDocument Copy()

Eine unabhängige Kopie (für Snapshots zum Rückgängigmachen oder Arbeit in einem anderen Thread).

Auf NexPdfDocument

PageView

public NexPdfPageView PageView(int page)

Wie page angezeigt wird, und die Transformation zwischen PDF- und Anzeigekoordinaten.

Auf NexPdfDocument

AskDocumentJson

public string AskDocumentJson(string question, int k = 5, int maxChars = 0)

Abruf des Dokumentassistenten (offline): die k relevantesten Passagen und ein seitenmarkierter Kontext für ein Sprachmodell, als JSON {"passages":[…],"context":"…","context_pages":[…]}.

Auf NexPdfDocument · immer verfügbar · C nexpdf_free

ToMarkdown

public string ToMarkdown()

Das Dokument als Markdown.

Auf NexPdfDocument · immer verfügbar · C nexpdf_free

Dispose

public void Dispose()

Gibt ein Dokument frei.

Auf NexPdfDocument · immer verfügbar · C nexpdf_free

Plain

public static NexPdfPageView Plain(double width, double height)

Eine ungedrehte Seite von width x height Punkt mit Ursprung bei 0,0.

Auf NexPdfPageView

FromJson

public static NexPdfPageView FromJson(string json)

Auf NexPdfPageView

ToView

public (double X, double Y) ToView(double x, double y, double scale = 1)

PDF-Punkt in Anzeigepixel.

Auf NexPdfPageView

ToPdf

public (double X, double Y) ToPdf(double vx, double vy, double scale = 1)

Anzeigepixel (z. B. ein Tippen) in einen PDF-Punkt.

Auf NexPdfPageView

DeltaToPdf

public (double X, double Y) DeltaToPdf(double dx, double dy, double scale = 1)

Eine Verschiebung auf dem Bildschirm (Pixel) als Verschiebung im PDF-Raum.

Auf NexPdfPageView

RectToView

public (double Left, double Top, double Right, double Bottom) RectToView(double llx, double lly, double urx, double ury, double scale = 1)

PDF-Rechteck in das Anzeigerechteck (links, oben, rechts, unten) in Pixeln.

Auf NexPdfPageView

RectToPdf

public (double Llx, double Lly, double Urx, double Ury) RectToPdf(double x1, double y1, double x2, double y2, double scale = 1)

Anzeigerechteck (zwei beliebige Ecken, Pixel) in ein PDF-Rechteck.

Auf NexPdfPageView

PageCount

public int PageCount

Anzahl der Seiten.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_count

IsDisposed

public bool IsDisposed

Auf NexPdfDocument

Bibliothek und Lizenzierung

LicenseStatusJson

public static string LicenseStatusJson()

Die aktive Lizenz als JSON: state (unlicensed, trial oder licensed), licensee, id, tier, modules, expires_at, days_left und watermark.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_license_status_json

Invoke

public static string Invoke(string? requestJson = null)

Die gesamte API hinter einem JSON-Aufruf, für Brücken, die nur Strings weitergeben: {"fn":"to_xlsx","args":[handle]} liefert {"ok":true,"result":...} oder {"ok":false,"error":"..."}. Dokumente sind Handle-Nummern, Byte-Puffer sind Base64.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_invoke

RegisterStandardFont

public static int RegisterStandardFont(byte[] data)

Registriert eine zu Helvetica, Times oder Courier kompatible TrueType-Schrift (zum Beispiel Liberation), die für nicht eingebettete Standardschriften und PDF/A verwendet wird. Nur für Builds ohne mitgelieferte Schriften nötig. 1 bei Erfolg, 0, wenn die Schrift keine solche ist.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_register_standard_font

HasBundledFonts

public static int HasBundledFonts()

1, wenn die Liberation-Schriften einkompiliert sind, 0 in den schlankeren Builds.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_has_bundled_fonts

Öffnen und Speichern

OpenBytesWithPassword

public static NexPdfDocument OpenBytesWithPassword(byte[] data, string? password = null)

Öffnet ein verschlüsseltes PDF mit seinem Benutzer- oder Besitzerpasswort (RC4, AES-128, AES-256). Scheitert mit „password required“ oder „incorrect password“, wenn das Passwort das Problem ist.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_open_bytes_with_password

FromHtml

public static NexPdfDocument FromHtml(string? html = null)

Layoutet HTML als neues PDF-Dokument.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_from_html

OpenOffice

public static NexPdfDocument OpenOffice(byte[] data)

Konvertiert Word-, Excel- oder PowerPoint-Bytes (Format erkannt) in ein neues PDF-Dokument.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_open_office

OpenEbook

public static NexPdfDocument OpenEbook(byte[] data)

Konvertiert EPUB, FictionBook (.fb2, .fb2.zip), XPS/OpenXPS oder ein CBZ-Comicarchiv in ein neues PDF-Dokument.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_open_ebook

OpenImage

public static NexPdfDocument OpenImage(byte[] data)

Konvertiert JPEG-, PNG- oder TIFF-Bytes in ein neues PDF, eine Seite pro Bild.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_open_image

SaveBytes

public byte[] SaveBytes()

Das Dokument mit jeder Änderung als PDF-Bytes (vollständig neu geschrieben).

Auf NexPdfDocument · immer verfügbar · C nexpdf_save_bytes

SaveLinearized

public byte[] SaveLinearized()

Ein linearisiertes („Fast Web View“) PDF: Die erste Seite erscheint, bevor der Download endet.

Auf NexPdfDocument · immer verfügbar · C nexpdf_save_linearized

Seiten und Rendering

PageWidth

public double PageWidth(int pageIndex)

Angezeigte Seitenbreite in Punkt (Beschnittrahmen, Drehung und /UserUnit angewendet).

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_width

PageHeight

public double PageHeight(int pageIndex)

Angezeigte Seitenhöhe in Punkt (Beschnittrahmen, Drehung und /UserUnit angewendet).

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_height

PageViewJson

public string PageViewJson(int pageIndex)

Wie die Seite angezeigt wird: width, height, rotation, user_unit, crop und die Matrix to_display von PDF zur Anzeige.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_view_json

RenderPagePng

public byte[] RenderPagePng(int pageIndex, double dpi)

Rendert eine Seite mit der angegebenen Auflösung (Punkte pro Zoll) als PNG. Renderings ohne Lizenz und mit Testschlüssel tragen ein Wasserzeichen.

Auf NexPdfDocument · immer verfügbar · C nexpdf_render_page_png

RenderThumbPng

public byte[] RenderThumbPng(int pageIndex, uint maxDim)

Rendert ein Miniatur-PNG, dessen längere Seite höchstens max_dim Pixel misst.

Auf NexPdfDocument · immer verfügbar · C nexpdf_render_thumb_png

SetOverprint

public int SetOverprint(int mode)

Überdrucksimulation für spätere Renderings: 0 = nur PDF/X-Dokumente (Standard), 1 = immer, 2 = nie.

Auf NexPdfDocument · immer verfügbar · C nexpdf_set_overprint

Text, Suche und Assistent

ExtractPageText

public string ExtractPageText(int pageIndex)

Der Text einer Seite in Lesereihenfolge.

Auf NexPdfDocument · immer verfügbar · C nexpdf_extract_page_text

ExtractMarkdown

public string ExtractMarkdown()

Das ganze Dokument als Markdown (Überschriften, Listen, Tabellen).

Auf NexPdfDocument · immer verfügbar · C nexpdf_extract_markdown

SearchJson

public string SearchJson(string? query = null)

Findet einen Text auf jeder Seite (ohne Beachtung der Groß- und Kleinschreibung). Liefert ein JSON-Array mit Treffern: page, context und das Rechteck llx, lly, urx, ury in PDF-Punkten.

Auf NexPdfDocument · immer verfügbar · C nexpdf_search_json

PageBlocksJson

public string PageBlocksJson(int pageIndex)

Die Textblöcke einer Seite als JSON: text, Schriftgröße size und das Rechteck llx, lly, urx, ury.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_blocks_json

AskDocument

public string AskDocument(string? question, uint k, uint maxChars)

Abruf des Dokumentassistenten, offline (BM25): die k für eine Frage relevantesten Passagen und ein seitenmarkierter Kontext mit höchstens max_chars Zeichen (0 = 200000) zum Senden an ein Sprachmodell. Liefert {"passages":[{"page","text","score"}],"context":"...","context_pages":[...]}.

Auf NexPdfDocument · immer verfügbar · C nexpdf_ask_document

PageWordsJson

public string PageWordsJson(int pageIndex, string? optionsJson = null)

Die Wörter einer Seite mit exakten Rahmen aus den Glyphenbreiten und dem Textzustand: text, bbox, quad (folgt gedrehtem Text), font, size, angle, line. {"glyphs":true} fügt die Glyphenrahmen hinzu.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_words_json

Konvertierung

ToHtml

public string ToHtml()

Das Dokument als HTML.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_html

ToJson

public string ToJson()

Der Dokumentinhalt als JSON.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_json

ToXml

public string ToXml()

Der Dokumentinhalt als XML.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_xml

ToCsv

public string ToCsv()

Tabellen des Dokuments als CSV.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_csv

ToRtf

public string ToRtf()

Das Dokument als RTF.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_rtf

ToDocx

public byte[] ToDocx()

Das Dokument als Word-Datei (.docx).

Auf NexPdfDocument · Modul conversion · C nexpdf_to_docx

ToXlsx

public byte[] ToXlsx()

Das Dokument als Excel-Arbeitsmappe, ein Blatt pro Seite.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_xlsx

ToPptx

public byte[] ToPptx()

Das Dokument als PowerPoint-Präsentation, eine Folie pro Seite.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_pptx

ToReflowHtml

public string ToReflowHtml(string? optionsJson = null)

Der Text als responsives HTML für kleine Bildschirme. Optionen (dürfen fehlen): {"pages":[0],"images":true,"full_page":true,"title":"..."}.

Auf NexPdfDocument · Modul conversion · C nexpdf_to_reflow_html

OpenXlsxWithClock

public static NexPdfDocument OpenXlsxWithClock(byte[] data, double clockUnixSeconds)

Konvertiert eine Excel-Arbeitsmappe mit fester Uhr: NOW() und TODAY() in Formeln ohne zwischengespeicherten Wert liefern die angegebene Unix-Zeit (Sekunden, keine Zeitzone angewendet).

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_open_xlsx_with_clock

OpenDocxWithOptionsJson

public static NexPdfDocument OpenDocxWithOptionsJson(byte[] data, string? optionsJson = null)

Konvertiert ein Word-Dokument mit den Optionen {"show_comments":false,"show_revisions":false}: Kommentare in Sprechblasen in einem Markup-Bereich und nachverfolgte Änderungen als Markup statt des endgültigen Dokuments.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_open_docx_with_options_json

Vorlagen

TemplateDocxToPdf

public static NexPdfDocument TemplateDocxToPdf(byte[] templateBytes, string? dataJson = null, string? optionsJson = null)

Füllt eine Word-Vorlage mit JSON-Daten und konvertiert sie in ein neues PDF-Dokument. Optionen: {"strict":false,"locale":"en"}; mit strict lässt ein fehlendes Feld den Aufruf scheitern.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_template_docx_to_pdf

TemplateDocxFill

public static byte[] TemplateDocxFill(byte[] templateBytes, string? dataJson = null)

Füllt eine Word-Vorlage mit JSON-Daten und liefert die neuen .docx-Bytes.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_template_docx_fill

TemplateHtmlToPdf

public static NexPdfDocument TemplateHtmlToPdf(string? htmlUtf8 = null, string? dataJson = null, string? optionsJson = null)

Füllt eine HTML-Vorlage mit JSON-Daten (Werte HTML-escaped, {{{raw}}} nicht) und layoutet sie als neues PDF-Dokument.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_template_html_to_pdf

TemplateFillPdf

public int TemplateFillPdf(string? dataJson = null, string? optionsJson = null)

Füllt eine PDF-Vorlage an Ort und Stelle: AcroForm-Felder nach Namen und Platzhalter im Seitentext. Optionen {"flatten","fields","text","strict","locale"}. Liefert die Anzahl der gefüllten Felder und Textzeilen.

Auf NexPdfDocument · Modul conversion · C nexpdf_template_fill_pdf

TemplateDocxFillWith

public static byte[] TemplateDocxFillWith(byte[] templateBytes, string? dataJson = null, string? optionsJson = null)

Füllt eine Word-Vorlage mit JSON-Daten und den Optionen {"strict","locale"} und liefert die neuen .docx-Bytes.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_template_docx_fill_with

Office-Bearbeitung

XlsxEdit

public static byte[] XlsxEdit(byte[] data, string? editsJson = null)

Setzt Zellen einer Excel-Arbeitsmappe (Zahlen, Text, Boolesche Werte, Formeln oder null zum Leeren), berechnet jede Formel und die Diagramme neu und liefert die neuen .xlsx-Bytes. JSON {"sheet","edits":[{"cell","value"}],"ranges":[{"start","rows"}],"recalculate"}.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_xlsx_edit

XlsxCellsJson

public static string XlsxCellsJson(byte[] data, string? optionsJson = null)

Die Zellen einer Excel-Arbeitsmappe als JSON: pro Blatt jede Zelle mit Typ, Wert und Formel. Optionen {"sheet","range","recalculate"}.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_xlsx_cells_json

DocxEdit

public static byte[] DocxEdit(byte[] data, string? opsJson = null)

Wendet Operationen auf ein Word-Dokument an und liefert die neuen .docx-Bytes: replace (über Runs, Kopf- und Fußzeilen hinweg), set_text, insert und delete für Absätze.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_docx_edit

DocxParagraphsJson

public static string DocxParagraphsJson(byte[] data)

Die Absätze eines Word-Dokuments als JSON: Index, Formatvorlage, Text und ob der Absatz in einer Tabelle steht.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_docx_paragraphs_json

Strukturierte Extraktion und Barcodes

ExtractTablesJson

public string ExtractTablesJson(int pageIndex, string? optionsJson = null)

Tabellen mit und ohne Linien einer Seite (jede Seite bei negativem Index) mit Zellen, Spannen, CSV und Markdown. Optionen {"ruled","unruled","min_unruled_lines"}.

Auf NexPdfDocument · Modul conversion · C nexpdf_extract_tables_json

ExtractKeyValuesJson

public string ExtractKeyValuesJson(string? optionsJson = null)

Label-Wert-Paare aus dem Layout und typisierte Entitäten (Datumsangaben, Beträge, IBANs, E-Mails, Telefonnummern, USt-IdNrn.) mit normalisierten Werten. Optionen {"pages","date_order"}.

Auf NexPdfDocument · Modul conversion · C nexpdf_extract_key_values_json

ExtractionPromptJson

public string ExtractionPromptJson(string? schemaJson = null, string? optionsJson = null)

Ein Prompt (system, prompt, response_schema), um ein JSON-Schema mit dem Sprachmodell Ihrer Wahl zu extrahieren. Die Engine führt keine Netzwerkaufrufe aus.

Auf NexPdfDocument · Modul conversion · C nexpdf_extraction_prompt_json

ExtractionValidateJson

public string ExtractionValidateJson(string? schemaJson = null, string? answerJson = null)

Validiert eine Modellantwort gegen das Schema, wandelt Werte in die passenden Typen um und verankert jeden Wert auf den Seiten: valid, value, errors, warnings, fields.

Auf NexPdfDocument · Modul conversion · C nexpdf_extraction_validate_json

ClassifyDocumentJson

public string ClassifyDocumentJson(string? labelsJson = null)

Klassifiziert das Dokument anhand von Schlüsselwörtern in eines der angegebenen Labels, mit Scores und einem Prompt für die LLM-Klassifizierung.

Auf NexPdfDocument · Modul conversion · C nexpdf_classify_document_json

ReadBarcodesJson

public string ReadBarcodesJson(int pageIndex, string? optionsJson = null)

Liest die Barcodes einer Seite (jede Seite bei negativem Index): QR, Data Matrix, Aztec, PDF417, Code 128/39/93, EAN/UPC, ITF, Codabar und mehr, mit Positionen in PDF-Punkten.

Auf NexPdfDocument · Modul conversion · C nexpdf_read_barcodes_json

ReadBarcodesImageJson

public static string ReadBarcodesImageJson(byte[] data, string? optionsJson = null)

Liest die Barcodes eines PNG- oder JPEG-Bilds, mit Positionen in Pixeln.

Auf NexPdfSdk (static) · Modul conversion · C nexpdf_read_barcodes_image_json

AddBarcode

public int AddBarcode(int pageIndex, double llx, double lly, double urx, double ury, string? format = null, string? text = null)

Zeichnet Text als Vektor-Barcode (weißer Hintergrund, Ruhezone) in ein Rechteck einer Seite, in PDF-Punkten.

Auf NexPdfDocument · Modul editor · C nexpdf_add_barcode

AddBarcodeEx

public int AddBarcodeEx(int pageIndex, double llx, double lly, double urx, double ury, string? format = null, string? text = null, string? optionsJson = null)

Zeichnet einen Vektor-Barcode mit den Optionen {"human_readable":"auto"|"always"|"never","quiet_zone","background","color"}; auto druckt die Ziffern unter EAN- und UPC-Codes.

Auf NexPdfDocument · Modul editor · C nexpdf_add_barcode_ex

Annotationen

AddAnnotation

public int AddAnnotation(int pageIndex, string? kind, string? colorHex, double opacity, string? contents, double llx, double lly, double urx, double ury)

Fügt eine Annotation hinzu. kind ist ein PDF-Annotationssubtyp wie Highlight, Underline, StrikeOut, Squiggly, Square, Circle, FreeText oder Text; Textmarkierungen werden an die Zeilen unter dem Rechteck angepasst. Die Farbe ist #RRGGBB, das Rechteck ist in PDF-Punkten.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_annotation

AddInk

public int AddInk(int pageIndex, string? colorHex, double strokeWidth, double opacity, string? coords = null)

Fügt eine Freihand-Annotation hinzu. coords ist "x,y;x,y;..." in PDF-Punkten.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_ink

AddLine

public int AddLine(int pageIndex, string? kind, string? colorHex, double opacity, double strokeWidth, double x1, double y1, double x2, double y2)

Fügt eine Linie oder einen Pfeil (kind ist Line oder Arrow) von (x1, y1) nach (x2, y2) in PDF-Punkten hinzu.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_line

AnnotationsJson

public string AnnotationsJson(int pageIndex)

Die Annotationen einer Seite als JSON: num, gen, kind, color, contents und das Rechteck.

Auf NexPdfDocument · immer verfügbar · C nexpdf_annotations_json

RemoveAnnotation

public int RemoveAnnotation(int pageIndex, uint num, ushort generation)

Entfernt die Annotation mit Objektnummer num und Generation gen von einer Seite.

Auf NexPdfDocument · Modul annotations · C nexpdf_remove_annotation

MoveAnnotation

public int MoveAnnotation(uint num, ushort generation, double dx, double dy)

Verschiebt eine Annotation um (dx, dy) PDF-Punkte.

Auf NexPdfDocument · Modul annotations · C nexpdf_move_annotation

SetAnnotationContents

public int SetAnnotationContents(uint num, ushort generation, string? contents = null)

Ersetzt den Textinhalt einer Annotation.

Auf NexPdfDocument · Modul annotations · C nexpdf_set_annotation_contents

ExportXfdf

public string ExportXfdf()

Exportiert jede Annotation als XFDF-Dokument.

Auf NexPdfDocument · Modul annotations · C nexpdf_export_xfdf

ImportXfdf

public int ImportXfdf(string? xfdf = null)

Importiert Annotationen aus einem XFDF-Dokument.

Auf NexPdfDocument · Modul annotations · C nexpdf_import_xfdf

FlattenAnnotations

public int FlattenAnnotations(int pageIndex)

Brennt Annotationen in den Seiteninhalt ein. Ein negativer Seitenindex verflacht jede Seite.

Auf NexPdfDocument · Modul annotations · C nexpdf_flatten_annotations

AddImageStamp

public int AddImageStamp(int page, double llx, double lly, double urx, double ury, byte[] rgba, uint width, uint height, double opacity)

Fügt eine Bildstempel-Annotation aus RGBA-Pixeln hinzu (Transparenz bleibt erhalten). 1 bei Erfolg.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_image_stamp

AddMeasurement

public string AddMeasurement(int page, string? json = null)

Speichert eine Messung: {"kind":"distance|perimeter|area","points":[[x,y],...],"unit":"mm","per_point":0.3528,"label":"1:100","color":"#2f54d6"}. Liefert {"num","gen","value","text"}.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_measurement

MeasurementsJson

public string MeasurementsJson()

Die gespeicherten Messungen als JSON.

Auf NexPdfDocument · immer verfügbar · C nexpdf_measurements_json

AddFileAttachmentAnnot

public int AddFileAttachmentAnnot(int pageIndex, double x, double y, string? name, byte[] data, string? mime = null, string? description = null)

Fügt eine Büroklammer-Annotation mit einer Datei hinzu; (x, y) ist die obere linke Ecke des Symbols in PDF-Punkten.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_file_attachment_annot

AddInkSignature

public int AddInkSignature(int pageIndex, string? colorHex, double strokeWidth, string? strokes = null)

Fügt eine handschriftliche Signatur hinzu: eine Freihand-Annotation mit mehreren Strichen ("x,y;x,y|x,y;x,y", PDF-Punkte) und dem Betreff „Signature“. Nur visuell; für eine kryptografische Signatur verwenden Sie eine PAdES-Signatur.

Auf NexPdfDocument · Modul annotations · C nexpdf_add_ink_signature

ReplyToAnnotation

public int ReplyToAnnotation(int pageIndex, uint num, ushort generation, string? author = null, string? text = null)

Fügt eine Antwort von author zu einer Annotation (oder zu einer anderen Antwort) hinzu. Liefert die Objektnummer der Antwort (Generation 0).

Auf NexPdfDocument · Modul annotations · C nexpdf_reply_to_annotation

AnnotationRepliesJson

public string AnnotationRepliesJson(int pageIndex, uint num, ushort generation)

Der Thread unter einer Annotation, älteste zuerst: num, gen, in_reply_to, author, date, text, state, state_model.

Auf NexPdfDocument · Modul annotations · C nexpdf_annotation_replies_json

SetAnnotationState

public int SetAnnotationState(int pageIndex, uint num, ushort generation, string? author = null, string? state = null)

Setzt einen Prüfstatus (Accepted, Rejected, Cancelled, Completed, None) oder Markierungsstatus (Marked, Unmarked) als versteckte Statusantwort. Liefert deren Objektnummer.

Auf NexPdfDocument · Modul annotations · C nexpdf_set_annotation_state

Formulare

FormFieldsJson

public string FormFieldsJson()

Die Formularfelder als JSON: name, kind, value, page, Rechteck, read_only und required.

Auf NexPdfDocument · Modul forms · C nexpdf_form_fields_json

FillFormField

public int FillFormField(string? name = null, string? value = null)

Setzt einen Feldwert wie ein Viewer: Die Keystroke- und Validate-Skripte prüfen den Wert, danach wird jedes berechnete Feld neu berechnet. Kontrollkästchen nehmen "true" oder "false", Listenfelder den Optionstext.

Auf NexPdfDocument · Modul forms · C nexpdf_fill_form_field

SetSignatureAppearance

public int SetSignatureAppearance(string? name, byte[] rgba, uint width, uint height)

Zeigt eine gezeichnete, getippte oder gescannte Signatur (RGBA-Pixel) in einem Signaturfeld an, ohne digital zu signieren; passend für jedes Widget skaliert und zentriert. Eine spätere digitale Signatur ersetzt sie.

Auf NexPdfDocument · Modul forms · C nexpdf_set_signature_appearance

AddFormField

public int AddFormField(int pageIndex, string? kind, string? name, double llx, double lly, double urx, double ury)

Fügt ein Formularfeld namens name in einem Rechteck einer Seite hinzu. kind: text (Standard), checkbox, radio, combobox, listbox, button, signature oder barcode.

Auf NexPdfDocument · Modul forms · C nexpdf_add_form_field

FlattenForms

public int FlattenForms()

Brennt die Formularfelder in den Seiteninhalt ein.

Auf NexPdfDocument · Modul forms · C nexpdf_flatten_forms

RecalculateForms

public int RecalculateForms()

Führt jedes Calculate-Skript aus; liefert, wie viele Felder sich geändert haben.

Auf NexPdfDocument · Modul forms · C nexpdf_recalculate_forms

ExportFormJson

public string ExportFormJson()

Die Feldwerte als JSON-Objekt.

Auf NexPdfDocument · Modul forms · C nexpdf_export_form_json

ImportFormJson

public int ImportFormJson(string? json = null)

Füllt Felder aus einem JSON-Objekt aus Namen und Werten.

Auf NexPdfDocument · Modul forms · C nexpdf_import_form_json

ExportFormFdf

public byte[] ExportFormFdf(string? pdfName = null)

Die Feldwerte als FDF-Datei; pdf_name ist der darin festgehaltene Dateiname.

Auf NexPdfDocument · Modul forms · C nexpdf_export_form_fdf

ImportFormFdf

public int ImportFormFdf(byte[] data)

Füllt Felder aus einer FDF-Datei.

Auf NexPdfDocument · Modul forms · C nexpdf_import_form_fdf

ExportFormXfdf

public string ExportFormXfdf(string? pdfName = null)

Die Feldwerte als XFDF.

Auf NexPdfDocument · Modul forms · C nexpdf_export_form_xfdf

ImportFormXfdf

public int ImportFormXfdf(string? xfdf = null)

Füllt Felder aus XFDF.

Auf NexPdfDocument · Modul forms · C nexpdf_import_form_xfdf

XFA-Formulare

XfaInfoJson

public string XfaInfoJson()

Ob das Dokument XFA hat, ob es dynamisch ist, die Anzahl der Felder und Daten sowie die XDP-Pakete.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_info_json

XfaExportData

public string XfaExportData(string? format = null)

Die XFA-Daten als xml (Standard) oder flaches json ({"path":"value"}). Scheitert, wenn das Dokument kein XFA hat.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_export_data

XfaImportData

public int XfaImportData(string? data = null, string? format = null)

Importiert XFA-Daten: XML ersetzt die Daten, JSON setzt die angegebenen Werte. Bei statischen Formularen werden die AcroForm-Felder aktualisiert. Liefert die Anzahl der importierten Werte.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_import_data

XfaToAcroform

public int XfaToAcroform()

Konvertiert in ein einfaches AcroForm-PDF und entfernt XFA; dynamische Formulare werden zu neuen Seiten gelayoutet, und zuvor laufen die Skripte. Textfelder behalten ihren formatierten Anzeigewert als /V. Liefert die Anzahl der AcroForm-Felder.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_to_acroform

XfaFlatten

public int XfaFlatten()

Konvertiert und verflacht das XFA-Formular: ein einfaches PDF mit gezeichneten Werten. Liefert die Anzahl der verflachten Widgets.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_flatten

XfaRemove

public int XfaRemove()

Entfernt XFA und behält die AcroForm-Felder und Seiten: 1 entfernt, 0 kein XFA.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_remove

XfaToAcroformJson

public string XfaToAcroformJson(string? optionsJson = null)

Konvertiert mit den Optionen {"scripts":true,"flatten":false} in AcroForm und liefert einen Bericht: flattened, fields, pages, warnings und validation_errors (som, test, severity, message).

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_to_acroform_json

XfaRunScriptsJson

public string XfaRunScriptsJson()

Führt die Skripte initialize, calculate und validate (FormCalc und JavaScript) aus und speichert berechnete Werte in den Daten: data_changed, warnings, validation_errors.

Auf NexPdfDocument · Modul forms · C nexpdf_xfa_run_scripts_json

RegisterFallbackFont

public static int RegisterFallbackFont(byte[] data)

Registriert eine TrueType-/OpenType-Schrift (oder .ttc) für Text, den die mitgelieferten Schriften nicht darstellen können (CJK, Arabisch und mehr), wenn XFA-Formulare gelayoutet werden; die Daten werden kopiert. 1 oder -1.

Auf NexPdfSdk (static) · Modul forms · C nexpdf_register_fallback_font

Zusammenarbeit in Echtzeit

SyncExportJson

public string SyncExportJson(ulong sinceVersion)

NexPDF Sync: jede Änderung (von jedem Client) mit einer Lamport-Uhr über since_version, als Änderungssatz nexpdf-sync/1.

Auf NexPdfDocument · Modul annotations · C nexpdf_sync_export_json

SyncExportLocalJson

public string SyncExportLocalJson(ulong sinceVersion)

NexPDF Sync: nur die eigenen Änderungen dieser Kopie über since_version (was ein Client sendet); behalten Sie die zurückgegebene clock für den nächsten Aufruf.

Auf NexPdfDocument · Modul annotations · C nexpdf_sync_export_local_json

SyncApplyJson

public string SyncApplyJson(string? changesJson = null)

NexPDF Sync: wendet entfernte Änderungen an, der letzte Schreiber gewinnt pro Datensatz. Liefert ok, clock, applied, ignored, conflicts und errors.

Auf NexPdfDocument · Modul annotations · C nexpdf_sync_apply_json

SyncSnapshotJson

public string SyncSnapshotJson()

NexPDF Sync: jeder Datensatz mit seiner Version, einschließlich Basisdatensätzen und Tombstones.

Auf NexPdfDocument · Modul annotations · C nexpdf_sync_snapshot_json

SyncSetClientId

public int SyncSetClientId(string? clientId = null)

NexPDF Sync: die Client-ID, unter der diese Kopie ihre Änderungen versioniert (1 bis 64 Zeichen aus [A-Za-z0-9-_.:@]).

Auf NexPdfDocument · Modul annotations · C nexpdf_sync_set_client_id

Seitenbearbeitung

RotatePage

public int RotatePage(int pageIndex, int degrees)

Dreht eine Seite um ein Vielfaches von 90 Grad.

Auf NexPdfDocument · Modul editor · C nexpdf_rotate_page

DeletePage

public int DeletePage(int pageIndex)

Löscht eine Seite.

Auf NexPdfDocument · Modul editor · C nexpdf_delete_page

DuplicatePage

public int DuplicatePage(int pageIndex)

Fügt eine Kopie einer Seite hinter ihr ein.

Auf NexPdfDocument · Modul editor · C nexpdf_duplicate_page

AddBlankPage

public int AddBlankPage()

Hängt eine leere Seite an.

Auf NexPdfDocument · Modul editor · C nexpdf_add_blank_page

ReversePages

public int ReversePages()

Kehrt die Seitenreihenfolge um.

Auf NexPdfDocument · Modul editor · C nexpdf_reverse_pages

MovePage

public int MovePage(int from, int to)

Verschiebt die Seite bei from auf den Index to.

Auf NexPdfDocument · Modul editor · C nexpdf_move_page

CropPage

public int CropPage(int pageIndex, double llx, double lly, double urx, double ury)

Setzt den Beschnittrahmen (Crop Box) einer Seite (PDF-Punkte).

Auf NexPdfDocument · Modul editor · C nexpdf_crop_page

ExtractPages

public NexPdfDocument ExtractPages(uint[] indices)

Ein neues Dokument aus den angegebenen Seiten (Teilen).

Auf NexPdfDocument · Modul editor · C nexpdf_extract_pages

AppendDocument

public int AppendDocument(NexPdfDocument other)

Hängt die Seiten eines anderen Dokuments an (Zusammenführen).

Auf NexPdfDocument · Modul editor · C nexpdf_append_document

InsertImagePages

public int InsertImagePages(int index, byte[] data)

Fügt die Bilder einer JPEG-, PNG- oder TIFF-Datei als Seiten vor index ein (begrenzt; die Seitenanzahl hängt an). Liefert die Anzahl der hinzugefügten Seiten.

Auf NexPdfDocument · immer verfügbar · C nexpdf_insert_image_pages

SetPageBackground

public int SetPageBackground(string? optionsJson, byte[] rgb, uint width, uint height)

Setzt einen Seitenhintergrund: eine Farbe und/oder ein RGB-Bild. Optionen: {"color":"#fbf4e2","fit":"cover|stretch|center","scale":1,"opacity":1,"pages":[]}. Liefert die geänderten Seiten.

Auf NexPdfDocument · Modul editor · C nexpdf_set_page_background

RemovePageBackground

public int RemovePageBackground(string? pagesJson = null)

Entfernt NexPDF-Hintergründe von den Seiten in pages_json ("[0,2]") oder von jeder Seite.

Auf NexPdfDocument · Modul editor · C nexpdf_remove_page_background

Inhaltsbearbeitung

PageContentJson

public string PageContentJson(int page)

Die Textzeilen und Bilder einer Seite als JSON: id, kind (text oder image), text, rect, size, color, font, family, bold, italic. IDs bleiben bis zur nächsten Bearbeitung dieser Seite gültig.

Auf NexPdfDocument · Modul editor · C nexpdf_page_content_json

EditText

public int EditText(int page, string? id = null, string? changeJson = null)

Bearbeitet eine Textzeile: {text?, size?, color?, dx?, dy?, family?, bold?, italic?}. Leerer Text löscht sie.

Auf NexPdfDocument · Modul editor · C nexpdf_edit_text

AddPageText

public int AddPageText(int page, string? json = null)

Fügt bearbeitbaren Seitentext hinzu: {text, x, y (baseline), size, color, family, bold, italic}.

Auf NexPdfDocument · Modul editor · C nexpdf_add_page_text

DeleteContent

public int DeleteContent(int page, string? id = null)

Löscht eine Textzeile oder ein Bild des Seiteninhalts.

Auf NexPdfDocument · Modul editor · C nexpdf_delete_content

TransformImage

public int TransformImage(int page, string? id, double llx, double lly, double urx, double ury)

Verschiebt ein Bild oder ändert seine Größe auf ein Rechteck (PDF-Punkte).

Auf NexPdfDocument · Modul editor · C nexpdf_transform_image

ReplaceImage

public int ReplaceImage(int page, string? id, byte[] rgb, uint width, uint height)

Ersetzt ein Bild durch RGB-Pixel (Breite x Höhe x 3 Bytes).

Auf NexPdfDocument · Modul editor · C nexpdf_replace_image

EditTextBlock

public int EditTextBlock(int pageIndex, string? text, string? colorHex, double fontSize, int bold, int italic, int replaceExisting, double llx, double lly, double urx, double ury)

Schreibt einen Textblock in ein Rechteck mit Farbe, Größe und Stil und ersetzt optional den dort vorhandenen Text.

Auf NexPdfDocument · Modul editor · C nexpdf_edit_text_block

Metadaten, Lesezeichen, Ebenen und Anhänge

MetadataJson

public string MetadataJson()

Die Dokumentinformationen (Titel, Autor, Thema, Schlüsselwörter, ...) als JSON.

Auf NexPdfDocument · immer verfügbar · C nexpdf_metadata_json

SetMetadata

public int SetMetadata(string? title = null, string? author = null, string? subject = null, string? keywords = null)

Setzt Titel, Autor, Thema und Schlüsselwörter. Fehlende (null) Werte behalten den aktuellen.

Auf NexPdfDocument · Modul editor · C nexpdf_set_metadata

OutlinesJson

public string OutlinesJson()

Die Lesezeichen als JSON: [{"title","page","children":[...]}].

Auf NexPdfDocument · immer verfügbar · C nexpdf_outlines_json

SetOutlinesJson

public int SetOutlinesJson(string? json = null)

Ersetzt die Lesezeichen durch einen JSON-Baum derselben Form.

Auf NexPdfDocument · Modul editor · C nexpdf_set_outlines_json

PageLabelsJson

public string PageLabelsJson()

Seitenbeschriftungen: {"labels":["i","ii","1"],"ranges":[{"start":0,"style":"roman","prefix":"","first":1}]}.

Auf NexPdfDocument · immer verfügbar · C nexpdf_page_labels_json

SetPageLabelsJson

public int SetPageLabelsJson(string? json = null)

Setzt die Bereiche der Seitenbeschriftungen ([] entfernt die Beschriftungen). Stile: decimal, roman, ROMAN, letters, LETTERS, none.

Auf NexPdfDocument · Modul editor · C nexpdf_set_page_labels_json

LayersJson

public string LayersJson()

Die optionalen Inhaltsgruppen (Ebenen): [{"num","gen","name","visible","printable"}].

Auf NexPdfDocument · immer verfügbar · C nexpdf_layers_json

SetLayerVisible

public int SetLayerVisible(uint num, ushort generation, int visible)

Zeigt oder verbirgt eine Ebene.

Auf NexPdfDocument · immer verfügbar · C nexpdf_set_layer_visible

AttachmentsJson

public string AttachmentsJson()

Die eingebetteten Dateien: [{"name","description","mime","size","page"}]; page ist bei Dateien auf Dokumentebene null.

Auf NexPdfDocument · immer verfügbar · C nexpdf_attachments_json

AttachmentData

public byte[] AttachmentData(string? name = null)

Die Bytes einer eingebetteten Datei.

Auf NexPdfDocument · immer verfügbar · C nexpdf_attachment_data

AddAttachment

public int AddAttachment(string? name, byte[] data, string? mime = null, string? description = null)

Bettet eine Datei auf Dokumentebene ein.

Auf NexPdfDocument · Modul editor · C nexpdf_add_attachment

RemoveAttachment

public int RemoveAttachment(string? name = null)

Entfernt eine eingebettete Datei.

Auf NexPdfDocument · Modul editor · C nexpdf_remove_attachment

Verschlüsselung, Wasserzeichen und Stempel

EncryptAes256

public int EncryptAes256(string? userPw = null, string? ownerPw = null)

Verschlüsselt mit AES-256 unter Verwendung eines Benutzerpassworts (zum Öffnen) und eines Besitzerpassworts.

Auf NexPdfDocument · Modul security · C nexpdf_encrypt_aes256

EncryptWithPermissions

public int EncryptWithPermissions(string? userPw, string? ownerPw, uint permissions)

Verschlüsselt mit AES-256 und einer Berechtigungsmaske: Drucken 1, Ändern 2, Kopieren 4, Annotieren 8, Formulare ausfüllen 16, Zusammenstellen 32.

Auf NexPdfDocument · Modul security · C nexpdf_encrypt_with_permissions

SecurityJson

public string SecurityJson()

Der Verschlüsselungszustand: {"encrypted","revision","owner","print","modify","copy","annotate","fill_forms","assemble"}.

Auf NexPdfDocument · immer verfügbar · C nexpdf_security_json

RemovePassword

public int RemovePassword(string? password = null)

Entfernt den Schutz. Braucht Besitzerzugriff: Das Dokument wurde mit dem Besitzerpasswort geöffnet, oder übergeben Sie es hier.

Auf NexPdfDocument · Modul security · C nexpdf_remove_password

AddWatermark

public int AddWatermark(string? text = null)

Bringt ein Text-Wasserzeichen auf jeder Seite an.

Auf NexPdfDocument · Modul security · C nexpdf_add_watermark

RemoveWatermarks

public int RemoveWatermarks()

Entfernt die von NexPDF hinzugefügten Wasserzeichen.

Auf NexPdfDocument · Modul security · C nexpdf_remove_watermarks

AddHeaderFooter

public int AddHeaderFooter(string? header, string? footer, double fontSize)

Fügt jeder Seite eine Kopf- und/oder Fußzeile hinzu. {page} und {total} werden ersetzt; eine Schriftgröße von 0 oder weniger verwendet den Standard.

Auf NexPdfDocument · Modul security · C nexpdf_add_header_footer

AddBates

public int AddBates(string? prefix, ulong start, uint digits)

Fügt Bates-Nummerierung hinzu: prefix, erste Nummer und Anzahl der Ziffern.

Auf NexPdfDocument · Modul security · C nexpdf_add_bates

Schwärzung

ApplyRedaction

public int ApplyRedaction(int pageIndex, double llx, double lly, double urx, double ury, int fillWhite)

Entfernt Text, Bilder und Annotationen unter einem Rechteck dauerhaft und malt ein deckendes Kästchen darüber, schwarz oder weiß.

Auf NexPdfDocument · Modul redaction · C nexpdf_apply_redaction

RedactMatches

public int RedactMatches(string? query, int mode, int fillWhite)

Findet und schwärzt jeden Treffer dauerhaft. mode: 0 = Text, 1 = regulärer Ausdruck, 2 = Muster-ID (email, phone, credit-card, iban, pt-nif, us-ssn, ipv4, url, date). Liefert die Anzahl der geschwärzten Bereiche.

Auf NexPdfDocument · Modul redaction · C nexpdf_redact_matches

Digitale Signaturen

SignPades

public byte[] SignPades(string? signer = null, string? reason = null, string? location = null)

Signiert mit einem neuen selbstsignierten Testzertifikat (PAdES B-B) und liefert die signierte Datei. Schreiben Sie die Bytes unverändert: Ein erneutes Speichern des Dokuments bricht die Signatur.

Auf NexPdfDocument · Modul signatures · C nexpdf_sign_pades

SignPkcs12

public byte[] SignPkcs12(byte[] p12, string? password = null, string? optionsJson = null)

Signiert mit einer PKCS#12-Identität (.p12/.pfx) und liefert die signierte Datei. Optionen: {"name","reason","location","contact","field","tsa_url","ltv":true,"appearance":{"page":0,"rect":[llx,lly,urx,ury],"ink":"x,y;x,y|...","text":"..."}}. Ohne .p12 wird ein selbstsigniertes Zertifikat erstellt.

Auf NexPdfDocument · Modul signatures · C nexpdf_sign_pkcs12

Pkcs12InfoJson

public static string Pkcs12InfoJson(byte[] data, string? password = null)

Die Zertifikatszusammenfassung einer PKCS#12-Datei; scheitert bei falschem Passwort mit „incorrect password“.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_pkcs12_info_json

PrepareExternalSignature

public byte[] PrepareExternalSignature(byte[] cert, string? optionsJson = null)

Externe Signierung (HSM, Smartcard, Cloud-KMS), Schritt 1: ein PDF mit einer leeren Signatur für das Signierzertifikat (PEM oder DER, optional gefolgt von seiner Kette). Optionen wie bei der PKCS#12-Signierung.

Auf NexPdfDocument · Modul signatures · C nexpdf_prepare_external_signature

ExternalSignatureData

public static byte[] ExternalSignatureData(byte[] prepared, byte[] cert)

Externe Signierung, Schritt 2: die zu signierenden Bytes (DER-signierte Attribute; signieren Sie bei Geräten, die einen Digest entgegennehmen, deren SHA-256).

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_external_signature_data

CompleteExternalSignature

public static byte[] CompleteExternalSignature(byte[] prepared, byte[] cert, byte[] signature, int algorithm, string? optionsJson = null)

Externe Signierung, Schritt 3: bettet die Signatur ein und liefert das signierte PDF. algorithm: 0 RSA PKCS#1 v1.5 SHA-256, 1 ECDSA SHA-256. Optionen: {"tsa_url":"...","ltv":true}.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_complete_external_signature

VerifySignaturesJson

public static string VerifySignaturesJson(byte[] data)

Verifiziert jede Signatur einer signierten Datei (ihre exakten Bytes). Jeder Eintrag hat field, signer, subject, digest_ok, signature_ok, covers_whole_document, reason, signing_time, timestamp_ok, chain_ok, trusted, revocation, ltv, level und mehr.

Auf NexPdfSdk (static) · immer verfügbar · C nexpdf_verify_signatures_json

VerifySignaturesWithRootsJson

public static string VerifySignaturesWithRootsJson(byte[] data, string? rootsPem = null)

Verifiziert die Signaturen und behandelt die PEM-Zertifikate in roots_pem als Vertrauensanker.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_verify_signatures_with_roots_json

AddLtv

public static byte[] AddLtv(byte[] data)

Fügt einer signierten Datei Langzeitvalidierungsdaten (DSS mit OCSP-Antworten und CRLs) hinzu.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_add_ltv

AddDocumentTimestamp

public byte[] AddDocumentTimestamp(string? optionsJson = null)

Fügt einen RFC-3161-Dokument-Zeitstempel einer TSA hinzu (PAdES B-LTA). Optionen: {"tsa_url" (required),"hash","field","reserved","ltv"}; mit ltv kommen zuerst die Validierungsdaten früherer Signaturen in das DSS. Liefert die neue Datei.

Auf NexPdfDocument · Modul signatures · C nexpdf_add_document_timestamp

AddDocumentTimestampBytes

public static byte[] AddDocumentTimestampBytes(byte[] data, string? optionsJson = null)

Fügt den Bytes einer PDF-Datei einen Dokument-Zeitstempel hinzu (zum Beispiel direkt aus dem Signieren). Dieselben Optionen. Liefert die neue Datei.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_add_document_timestamp_bytes

PrepareDocumentTimestamp

public byte[] PrepareDocumentTimestamp(string? optionsJson = null)

Dokument-Zeitstempel von Ihrer eigenen TSA oder Ihrem HSM, Schritt 1: das PDF mit einem leeren Zeitstempel (Optionen wie beim Hinzufügen eines Zeitstempels, ohne tsa_url).

Auf NexPdfDocument · Modul signatures · C nexpdf_prepare_document_timestamp

DocumentTimestampRequest

public static byte[] DocumentTimestampRequest(byte[] prepared, string? hash = null)

Dokument-Zeitstempel, Schritt 2: der DER-kodierte TimeStampReq, der als application/timestamp-query an die TSA gesendet wird (Hash standardmäßig SHA-256).

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_document_timestamp_request

CompleteDocumentTimestamp

public static byte[] CompleteDocumentTimestamp(byte[] prepared, byte[] token)

Dokument-Zeitstempel, Schritt 3: das zeitgestempelte PDF, aus der vorbereiteten Datei und dem TSA-Token (TimeStampResp oder TimeStampToken).

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_complete_document_timestamp

SignatureTimestampRequest

public static byte[] SignatureTimestampRequest(byte[] data, string? hash = null)

B-T in Schritten: der DER-kodierte TimeStampReq über den Wert der letzten Signatur (standardmäßig SHA-256), der als application/timestamp-query per POST an die TSA gesendet wird.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_signature_timestamp_request

AddSignatureTimestamp

public static byte[] AddSignatureTimestamp(byte[] data, byte[] token)

B-T in Schritten: speichert die Antwort der TSA (TimeStampResp oder TimeStampToken) in der letzten Signatur, die signierten Bytes bleiben unverändert, und liefert das PDF.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_add_signature_timestamp

LtvRequestsJson

public static string LtvRequestsJson(byte[] data, string? responsesJson = null)

B-LT in Schritten: die HTTP-Anfragen (OCSP, CRL, Zertifikate), die die Validierungsdaten noch brauchen, bei den bisherigen Antworten; [], wenn nichts fehlt.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_ltv_requests_json

AddLtvWithResponses

public static byte[] AddLtvWithResponses(byte[] data, string? responsesJson = null)

B-LT in Schritten: fügt das /DSS aus den abgerufenen Antworten (fehlende gelten als fehlgeschlagen) als inkrementelles Update hinzu und liefert das PDF.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_add_ltv_with_responses

ValidateLtaJson

public static string ValidateLtaJson(byte[] data, string? trustRootsPem = null)

Vollständige PAdES-B-LTA-Validierung: ob das /DSS jeder zeitgestempelten Revision jedes Zertifikat und jeden verifizierten OCSP- oder CRL-Eintrag enthält, den die früheren Signaturen und Zeitstempel brauchen. Liefert complete und timestamps mit ihren issues.

Auf NexPdfSdk (static) · Modul signatures · C nexpdf_validate_lta_json

PDF/A, PDF/X und PDF/UA

ConvertPdfa

public int ConvertPdfa()

Konvertiert das Dokument zur Archivierung in PDF/A (ISO 19005).

Auf NexPdfDocument · Modul standards · C nexpdf_convert_pdfa

ConvertPdfx

public int ConvertPdfx()

Konvertiert das Dokument für den Druckdatenaustausch in PDF/X.

Auf NexPdfDocument · Modul standards · C nexpdf_convert_pdfx

AutoTag

public string AutoTag(string? lang, int force)

Taggt das Dokument für die Barrierefreiheit (PDF/UA-Strukturbaum, Sprache, Titel, Metadaten). lang ist ein BCP-47-Tag (Standard en-US); force taggt ein bereits getaggtes Dokument neu. Liefert einen JSON-Bericht.

Auf NexPdfDocument · Modul standards · C nexpdf_auto_tag

ValidatePdfaJson

public string ValidatePdfaJson(string? level = null)

Regelbasierte PDF/A-Validierung für 1a bis 4f (die deklarierte Stufe oder 2b, wenn leer): compliant, level und failures mit clause, message, page und object.

Auf NexPdfDocument · Modul standards · C nexpdf_validate_pdfa_json

ValidatePdfuaJson

public string ValidatePdfuaJson()

PDF/UA-Validierung (PDF/UA-1 oder, wenn deklariert, PDF/UA-2), mit demselben Bericht wie die PDF/A-Validierung.

Auf NexPdfDocument · Modul standards · C nexpdf_validate_pdfua_json

ConvertPdfaLevel

public int ConvertPdfaLevel(string? level = null)

Konvertiert in eine gewählte PDF/A-Stufe (2b, wenn leer); Stufe A taggt das Dokument zuerst. 1, wenn das Ergebnis validiert; andernfalls listet der Fehler die noch fehlschlagenden Klauseln auf.

Auf NexPdfDocument · Modul standards · C nexpdf_convert_pdfa_level

ConvertPdfaJson

public string ConvertPdfaJson(string? level, double flattenDpi, int substituteFonts)

Konvertiert in eine PDF/A-Stufe (1a bis 4f, 2b, wenn leer) und liefert den Bericht: level, compliant, fixed, substitutions und remaining. flatten_dpi ist die Auflösung, mit der die PDF/A-1-Transparenz verflacht wird (300 bei 0 oder weniger); substitute_fonts 0 lässt nicht eingebettete Schriften unverändert.

Auf NexPdfDocument · Modul standards · C nexpdf_convert_pdfa_json

ConvertPdfuaJson

public string ConvertPdfuaJson(int part, string? lang = null)

Konvertiert in PDF/UA-1 oder PDF/UA-2 (Teil 1 oder 2): taggt ein nicht getaggtes Dokument, bettet Schriften ein und verwendet bei Teil 2 die PDF-2.0-Namespaces. lang (en-US, wenn leer) gilt, wenn das Dokument keine hat. Liefert profile, compliant, fixed, warnings, substitutions, remaining.

Auf NexPdfDocument · Modul standards · C nexpdf_convert_pdfua_json

ValidatePdfuaPartJson

public string ValidatePdfuaPartJson(int part)

Validiert gegen PDF/UA-1 oder PDF/UA-2 (Teil 1 oder 2), unabhängig davon, was das Dokument deklariert, mit demselben Bericht wie die PDF/UA-Validierung.

Auf NexPdfDocument · Modul standards · C nexpdf_validate_pdfua_part_json

RegisterSubstituteFont

public static string RegisterSubstituteFont(byte[] data)

Registriert TrueType-Schriftdaten für die Schriftersetzung bei PDF/A und PDF/UA: Nicht eingebettete Schriften mit demselben PostScript- oder Familiennamen verwenden sie. Liefert den PostScript-Namen oder nichts, wenn die Daten keine TrueType-Schrift mit glyf-Konturen sind.

Auf NexPdfSdk (static) · Modul standards · C nexpdf_register_substitute_font

OCR

Ocr

public string Ocr(string? optionsJson = null)

Erkennt gescannte Seiten und fügt eine unsichtbare, durchsuchbare Textebene hinzu. Optionen (dürfen fehlen): {"engine":"auto|builtin|tesseract|neural","languages":"por+eng","dpi":300,"pages":[0],"force":false}. Liefert einen JSON-Bericht.

Auf NexPdfDocument · Modul ocr · C nexpdf_ocr

OcrLoadModel

public static int OcrLoadModel(string? optionsJson, byte[] model, string? dictionary = null)

Lädt zur Laufzeit ein neuronales OCR-Modell (ONNX): {"kind":"detection"|"recognition"|"classification","languages","name","input_height","max_side"}; ein Erkennungsmodell braucht sein Zeichenwörterbuch, ein Detection-Modell oder ein Textrichtungs-Klassifikator (0°/180°) braucht keines.

Auf NexPdfSdk (static) · Modul ocr · C nexpdf_ocr_load_model

OcrModelsJson

public static string OcrModelsJson()

Die geladenen OCR-Modelle: kind, name, languages, symbols, size.

Auf NexPdfSdk (static) · Modul ocr · C nexpdf_ocr_models_json

OcrUnloadModels

public static int OcrUnloadModels(string? languages = null)

Entlädt die OCR-Modelle der angegebenen Sprachen (alle, wenn leer). Liefert die Anzahl der entfernten.

Auf NexPdfSdk (static) · Modul ocr · C nexpdf_ocr_unload_models

Vergleichen, optimieren und Speicher

CompareJson

public string CompareJson(NexPdfDocument b, double dpi)

Vergleicht zwei Dokumente (Text- und visuelle Unterschiede pro Seite) mit der angegebenen Auflösung, als JSON.

Auf NexPdfDocument · immer verfügbar · C nexpdf_compare_json

CompareOverlayPng

public byte[] CompareOverlayPng(NexPdfDocument b, int pageIndex, double dpi)

Ein PNG-Overlay der visuellen Unterschiede einer Seite zweier Dokumente.

Auf NexPdfDocument · immer verfügbar · C nexpdf_compare_overlay_png

Optimize

public string Optimize()

Optimiert das Dokument (entfernt nicht verwendete Objekte, komprimiert Streams neu); liefert einen JSON-Bericht.

Auf NexPdfDocument · Modul editor · C nexpdf_optimize

SubsetFonts

public string SubsetFonts()

Reduziert die eingebetteten Schriften auf die Glyphen, die das Dokument verwendet; liefert einen JSON-Bericht.

Auf NexPdfDocument · Modul editor · C nexpdf_subset_fonts

TrimMemory

public long TrimMemory()

Verwirft zwischengespeicherte Daten des Dokuments; liefert die freigegebenen Bytes.

Auf NexPdfDocument · immer verfügbar · C nexpdf_trim_memory

MemoryUsageBytes

public long MemoryUsageBytes()

Ungefährer vom Dokument belegter Speicher, in Bytes.

Auf NexPdfDocument · immer verfügbar · C nexpdf_memory_usage_bytes

CompareTextJson

public string CompareTextJson(NexPdfDocument b, string? optionsJson = null)

Wortgenauer Textvergleich zweier Dokumente: eingefügter, gelöschter, ersetzter und verschobener Text mit Positionen sowie eine Zusammenfassung. Optionen {"ignore_case","ignore_punctuation","detect_moves","min_move_words","align","page_map"}.

Auf NexPdfDocument · immer verfügbar · C nexpdf_compare_text_json

CompareAnnotate

public byte[] CompareAnnotate(NexPdfDocument b, string? optionsJson = null)

Der wortgenaue Vergleich als neues PDF mit Hervorhebungs-Annotationen (gelöscht rot, eingefügt grün, verschoben blau). Die Optionen ergänzen output, author und die Farben.

Auf NexPdfDocument · immer verfügbar · C nexpdf_compare_annotate

Weitere

SetAnnotationFlags

public int SetAnnotationFlags(uint num, ushort generation, string? flagsJson = null)

Annotations-Flags (/F). flags_json: {"readonly":true,"print":false} ändert nur die genannten Flags; ["print","locked"] setzt genau diese; eine Zahl ist die Bitmaske. Namen: invisible, hidden, print, nozoom, norotate, noview, readonly, locked, togglenoview, lockedcontents. XFDF-Import und -Export behalten sie (flags="print,readonly"). 1 bei Erfolg.

Auf NexPdfDocument

SetAnnotationStyle

public int SetAnnotationStyle(uint num, ushort generation, string? styleJson = null)

Farbe, Deckkraft und Rahmenbreite, danach ein neues Erscheinungsbild: {"color":"#RRGGBB","opacity":0.5, "border_width":2}, jeder Schlüssel optional (ein fehlender Schlüssel behält den aktuellen Wert). 1 bei Erfolg.

Auf NexPdfDocument

Auf dieser Seite

Einrichtung und LebenszyklusActivateLicenseIsLicensedPlatformsVersionLastErrorOpenBytesOpenFromHtmlOpenOfficeOpenEbookOpenImageOpenBytesWithPasswordSaveCopyPageViewAskDocumentJsonToMarkdownDisposePlainFromJsonToViewToPdfDeltaToPdfRectToViewRectToPdfPageCountIsDisposedBibliothek und LizenzierungLicenseStatusJsonInvokeRegisterStandardFontHasBundledFontsÖffnen und SpeichernOpenBytesWithPasswordFromHtmlOpenOfficeOpenEbookOpenImageSaveBytesSaveLinearizedSeiten und RenderingPageWidthPageHeightPageViewJsonRenderPagePngRenderThumbPngSetOverprintText, Suche und AssistentExtractPageTextExtractMarkdownSearchJsonPageBlocksJsonAskDocumentPageWordsJsonKonvertierungToHtmlToJsonToXmlToCsvToRtfToDocxToXlsxToPptxToReflowHtmlOpenXlsxWithClockOpenDocxWithOptionsJsonVorlagenTemplateDocxToPdfTemplateDocxFillTemplateHtmlToPdfTemplateFillPdfTemplateDocxFillWithOffice-BearbeitungXlsxEditXlsxCellsJsonDocxEditDocxParagraphsJsonStrukturierte Extraktion und BarcodesExtractTablesJsonExtractKeyValuesJsonExtractionPromptJsonExtractionValidateJsonClassifyDocumentJsonReadBarcodesJsonReadBarcodesImageJsonAddBarcodeAddBarcodeExAnnotationenAddAnnotationAddInkAddLineAnnotationsJsonRemoveAnnotationMoveAnnotationSetAnnotationContentsExportXfdfImportXfdfFlattenAnnotationsAddImageStampAddMeasurementMeasurementsJsonAddFileAttachmentAnnotAddInkSignatureReplyToAnnotationAnnotationRepliesJsonSetAnnotationStateFormulareFormFieldsJsonFillFormFieldSetSignatureAppearanceAddFormFieldFlattenFormsRecalculateFormsExportFormJsonImportFormJsonExportFormFdfImportFormFdfExportFormXfdfImportFormXfdfXFA-FormulareXfaInfoJsonXfaExportDataXfaImportDataXfaToAcroformXfaFlattenXfaRemoveXfaToAcroformJsonXfaRunScriptsJsonRegisterFallbackFontZusammenarbeit in EchtzeitSyncExportJsonSyncExportLocalJsonSyncApplyJsonSyncSnapshotJsonSyncSetClientIdSeitenbearbeitungRotatePageDeletePageDuplicatePageAddBlankPageReversePagesMovePageCropPageExtractPagesAppendDocumentInsertImagePagesSetPageBackgroundRemovePageBackgroundInhaltsbearbeitungPageContentJsonEditTextAddPageTextDeleteContentTransformImageReplaceImageEditTextBlockMetadaten, Lesezeichen, Ebenen und AnhängeMetadataJsonSetMetadataOutlinesJsonSetOutlinesJsonPageLabelsJsonSetPageLabelsJsonLayersJsonSetLayerVisibleAttachmentsJsonAttachmentDataAddAttachmentRemoveAttachmentVerschlüsselung, Wasserzeichen und StempelEncryptAes256EncryptWithPermissionsSecurityJsonRemovePasswordAddWatermarkRemoveWatermarksAddHeaderFooterAddBatesSchwärzungApplyRedactionRedactMatchesDigitale SignaturenSignPadesSignPkcs12Pkcs12InfoJsonPrepareExternalSignatureExternalSignatureDataCompleteExternalSignatureVerifySignaturesJsonVerifySignaturesWithRootsJsonAddLtvAddDocumentTimestampAddDocumentTimestampBytesPrepareDocumentTimestampDocumentTimestampRequestCompleteDocumentTimestampSignatureTimestampRequestAddSignatureTimestampLtvRequestsJsonAddLtvWithResponsesValidateLtaJsonPDF/A, PDF/X und PDF/UAConvertPdfaConvertPdfxAutoTagValidatePdfaJsonValidatePdfuaJsonConvertPdfaLevelConvertPdfaJsonConvertPdfuaJsonValidatePdfuaPartJsonRegisterSubstituteFontOCROcrOcrLoadModelOcrModelsJsonOcrUnloadModelsVergleichen, optimieren und SpeicherCompareJsonCompareOverlayPngOptimizeSubsetFontsTrimMemoryMemoryUsageBytesCompareTextJsonCompareAnnotateWeitereSetAnnotationFlagsSetAnnotationStyle