API-Referenz
Jede Klasse, Methode und Funktion des NexPDF-Android-SDKs, nach Funktionen gruppiert. Generiert aus NexPDF 1.1.0.
Generiert aus NexPDF 1.1.0
Diese Seite wird aus den Quellen von com.nexdevit:nexpdf-android generiert. Sie listet 220 Mitglieder auf. Optionen und Ergebnisse, die JSON-Strings sind, verwenden in jedem NexPDF-SDK dasselbe JSON. Modul ist das Lizenzmodul, das ein Aufruf benötigt; mit „immer verfügbar“ gekennzeichnete Aufrufe funktionieren ohne Lizenzschlüssel.
Einrichtung und Lebenszyklus
initialize
public static int initialize(Context context)
public static int initialize(Context context, String keyOrXml)Aktiviert den Schlüssel aus den Manifest-Meta-Daten, sonst aus assets/nexpdf_license.xml.
Auf NexPdfLicense (static)
status
public static String status()Aktueller Zustand als JSON: state (unlicensed|trial|licensed), licensee, modules, days_left…
Auf NexPdfLicense (static)
openBytes
public static NexPdfDocument openBytes(byte[] bytes)
public static NexPdfDocument openBytes(byte[] bytes, String password)Öffnet PDF-Bytes oder JPEG- / PNG- / TIFF-Bilder (je eine Seite). Word- / Excel- / PowerPoint-Dateien sowie EPUB- / FictionBook- / XPS-Bücher und CBZ-Comics werden konvertiert (Modul: conversion).
Auf NexPdfDocument
isPasswordError
public static boolean isPasswordError(Throwable e)Ob eine Exception von #openBytes bedeutet, dass das Passwort fehlt oder falsch ist.
Auf NexPdfDocument
openEbook
public static NexPdfDocument openEbook(byte[] bytes)EPUB-, FictionBook- (.fb2 / .fb2.zip), XPS- / OpenXPS- oder CBZ-Comic-Bytes in ein neues PDF (Modul: conversion).
Auf NexPdfDocument
openImage
public static NexPdfDocument openImage(byte[] bytes)JPEG- / PNG- / TIFF-Bilder in ein neues PDF, eine Seite pro Bild.
Auf NexPdfDocument
openOffice
public static NexPdfDocument openOffice(byte[] bytes)Konvertiert DOCX- / XLSX- / PPTX-Bytes in ein neues PDF.
Auf NexPdfDocument
fromHtml
public static NexPdfDocument fromHtml(String html)Layoutet HTML als neues PDF.
Auf NexPdfDocument
handle
public long handle()Das native Handle, für NexPdfJni-Aufrufe. @Override
Auf NexPdfDocument
pageCount
public int pageCount()Auf NexPdfDocument
pageWidth
public double pageWidth(int pageIndex)Angezeigte Seitenbreite in Punkten: die Crop Box (auf die Media Box beschnitten), nach /Rotate und /UserUnit.
Auf NexPdfDocument
pageHeight
public double pageHeight(int pageIndex)Angezeigte Seitenhöhe in Punkten: die Crop Box (auf die Media Box beschnitten), nach /Rotate und /UserUnit.
Auf NexPdfDocument
pageView
public PageView pageView(int pageIndex)Wie die Seite angezeigt wird (Crop Box, Rotation, User Unit) und die Transformation PDF <-> Anzeige. Verwenden Sie sie für jede Umrechnung zwischen Bildschirm- und PDF-Koordinaten. Nie null: fällt auf eine nicht gedrehte Seite von #pageWidth x #pageHeight am Ursprung zurück.
Auf NexPdfDocument
renderPagePng
public byte[] renderPagePng(int pageIndex, double dpi)Auf NexPdfDocument
pageText
public String pageText(int pageIndex)Auf NexPdfDocument
toMarkdown
public String toMarkdown()Auf NexPdfDocument
toJson
public String toJson()Auf NexPdfDocument
toDocx
public byte[] toDocx()Auf NexPdfDocument
searchJson
public String searchJson(String query)Findet query; ein JSON-Array aus {page, context, llx, lly, urx, ury}: die Seite ab 0, der umgebende Text und das Rechteck des Treffers in PDF-Punkten (Ursprung unten links).
Auf NexPdfDocument
saveBytes
public byte[] saveBytes()Das Dokument mit allen Änderungen als PDF-Bytes.
Auf NexPdfDocument
saveLinearized
public byte[] saveLinearized()Linearisierte PDF-Bytes („Fast Web View“): Die erste Seite wird angezeigt, bevor der Download endet.
Auf NexPdfDocument
pageLabelsJson
public String pageLabelsJson(){"labels":["i","ii","1"],"ranges":[{"start":0,"style":"roman","prefix":"","first":1]}}.
Auf NexPdfDocument
setPageLabelsJson
public boolean setPageLabelsJson(String rangesJson)Setzt die Bereiche der Seitenbeschriftungen ([] entfernt sie; Modul: editor).
Auf NexPdfDocument
trimMemory
public long trimMemory()Verdichtet interne Puffer; liefert die ungefähre Anzahl zurückgewonnener Bytes.
Auf NexPdfDocument
prepareExternalSignature
public byte[] prepareExternalSignature(byte[] cert, String optionsJson)Externes Signieren, Schritt 1 von 3: dieses Dokument mit einer leeren Signatur, zur Übergabe an #externalSignatureData und dann #completeExternalSignature. cert ist das Zertifikat des Signierers in PEM oder DER, optional gefolgt von seiner Kette.
Auf NexPdfDocument
externalSignatureData
public static byte[] externalSignatureData(byte[] prepared, byte[] cert)Externes Signieren, Schritt 2: die Bytes, die das HSM / die Karte / das KMS signiert (DER-kodierte signierte Attribute).
Auf NexPdfDocument
completeExternalSignature
public static byte[] completeExternalSignature(byte[] prepared, byte[] cert, byte[] signature, int algorithm, String optionsJson)Externes Signieren, Schritt 3: das signierte PDF. algorithm 0 = RSA PKCS#1 v1.5 SHA-256, 1 = ECDSA SHA-256 (DER oder roh r||s). Optionen {"tsa_url":"…","ltv":true} oder null.
Auf NexPdfDocument
fromDocxTemplate
public static NexPdfDocument fromDocxTemplate(byte[] template, String dataJson, String optionsJson)Füllt ein Word-Template mit dataJson und konvertiert es in PDF. Wirft bei einem Fehler (z. B. einem fehlenden Feld im Modus strict).
Auf NexPdfDocument
fromHtmlTemplate
public static NexPdfDocument fromHtmlTemplate(String html, String dataJson, String optionsJson)Füllt ein HTML-Template mit dataJson und layoutet es als neues PDF.
Auf NexPdfDocument
fillDocxTemplate
public static byte[] fillDocxTemplate(byte[] template, String dataJson)Füllt ein Word-Template; die neue .docx (bei einem Fehler leer, siehe NexPdfJni#lastError()).
Auf NexPdfDocument
fillTemplate
public int fillTemplate(String dataJson, String optionsJson)Füllt die Formularfelder und Textplatzhalter dieses PDFs; die Anzahl der gefüllten, oder -1.
Auf NexPdfDocument
addDocumentTimestamp
public byte[] addDocumentTimestamp(String optionsJson)Dieses Dokument mit einem PAdES-Dokument-Zeitstempel von tsa_url (Modul: signatures).
Auf NexPdfDocument
prepareDocumentTimestamp
public byte[] prepareDocumentTimestamp(String optionsJson)Eigene TSA / eigenes HSM, Schritt 1 (dann NexPdfJni#documentTimestampRequest, NexPdfJni#completeDocumentTimestamp).
Auf NexPdfDocument
replyToAnnotation
public int replyToAnnotation(int pageIndex, int num, int gen, String author, String text)Antwortet auf die Annotation num / gen; die Objektnummer der Antwort, oder 0.
Auf NexPdfDocument
annotationRepliesJson
public String annotationRepliesJson(int pageIndex, int num, int gen)Der Thread unter einer Annotation, älteste zuerst, als JSON.
Auf NexPdfDocument
setAnnotationState
public int setAnnotationState(int pageIndex, int num, int gen, String author, String state)Setzt einen Prüfstatus („Accepted“, „Rejected“, „Completed“, „Marked“, …); die Nummer der Statusantwort, oder 0.
Auf NexPdfDocument
extractTablesJson
public String extractTablesJson(int pageIndex, String optionsJson)Tabellen von pageIndex (< 0 = jede Seite) als JSON.
Auf NexPdfDocument
extractKeyValuesJson
public String extractKeyValuesJson(String optionsJson)Auf NexPdfDocument
extractionPromptJson
public String extractionPromptJson(String schemaJson, String optionsJson)Auf NexPdfDocument
extractionValidateJson
public String extractionValidateJson(String schemaJson, String answerJson)Validiert die Antwort eines Sprachmodells gegen das Schema, verankert auf den Seiten dieses Dokuments.
Auf NexPdfDocument
classifyJson
public String classifyJson(String labelsJson)Auf NexPdfDocument
xfaInfoJson
public String xfaInfoJson()Auf NexPdfDocument
xfaExportData
public String xfaExportData(String format)"xml" (null) oder "json"; "", wenn es kein XFA gibt.
Auf NexPdfDocument
xfaImportData
public int xfaImportData(String data, String format)Auf NexPdfDocument
xfaToAcroform
public int xfaToAcroform()Auf NexPdfDocument
xfaFlatten
public int xfaFlatten()Auf NexPdfDocument
xfaRemove
public int xfaRemove()Auf NexPdfDocument
compareTextJson
public String compareTextJson(NexPdfDocument newer, String optionsJson)Änderungen auf Wortebene von diesem (alten) Dokument zu newer, als JSON (Modul: viewer).
Auf NexPdfDocument
compareAnnotate
public byte[] compareAnnotate(NexPdfDocument newer, String optionsJson)Der Vergleich als PDF mit Hervorhebungs-Annotationen (öffnen Sie es mit #openBytes).
Auf NexPdfDocument
readBarcodesJson
public String readBarcodesJson(int pageIndex, String optionsJson)Barcodes auf pageIndex (< 0 = jede Seite) als JSON, Rechtecke in PDF-Punkten.
Auf NexPdfDocument
readBarcodesImageJson
public static String readBarcodesImageJson(byte[] image, String optionsJson)Barcodes in einem PNG- oder JPEG-Bild als JSON, Rechtecke in Pixeln.
Auf NexPdfDocument
addBarcode
public boolean addBarcode(int pageIndex, double llx, double lly, double urx, double ury, String format, String text)Zeichnet text als Vektor-Barcode in das Rechteck (PDF-Punkte).
Auf NexPdfDocument
validatePdfaJson
public String validatePdfaJson(String level)Auf NexPdfDocument
validatePdfuaJson
public String validatePdfuaJson()Auf NexPdfDocument
convertPdfaLevel
public boolean convertPdfaLevel(String level)Konvertiert in eine PDF/A-Stufe; false, wenn noch Klauseln fehlschlagen (NexPdfJni#lastError() listet sie auf).
Auf NexPdfDocument
isClosed
public boolean isClosed()Auf NexPdfDocument
close
public void close()Auf NexPdfDocument
setEventListener
public static void setEventListener(EventListener l)Erhält die Ereignisse jedes Readers (Main-Thread). Übergeben Sie null, um das Lauschen zu beenden.
Auf NexPdfReaderActivity (static)
closeCurrent
public static void closeCurrent()Schließt den Reader, der gerade angezeigt wird, falls vorhanden (von den React-Native- und Flutter-Bridges verwendet).
Auf NexPdfReaderActivity (static)
intent
public static Intent intent(android.content.Context ctx, Uri document, String configJson)Ein Intent, der document (content:- oder file:-URI, darf null sein) mit configJson öffnet.
Auf NexPdfReaderActivity (static)
Bibliothek und Lizenzierung
version
public static native String version();Die Version der Engine.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_version
licenseActivate
public static native int licenseActivate(String keyOrXml, String platform, String appId);Aktiviert einen Lizenzschlüssel oder eine Lizenz-XML für den Prozess. Gibt 2 (lizenziert), 1 (Test) oder einen negativen Fehlercode zurück (-1 fehlerhaft, -2 ungültige Signatur, -3 nicht unterstützte Version, -4 abgelaufen, -5 noch nicht gültig, -6 falsche Plattform, -7 falsche App-ID).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_license_activate
licenseStatusJson
public static native String licenseStatusJson();Die aktive Lizenz als JSON: state (unlicensed, trial oder licensed), licensee, id, tier, modules, expires_at, days_left und watermark.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_license_status_json
lastError
public static native String lastError();Warum der letzte Aufruf in diesem Thread fehlgeschlagen ist, oder nichts.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_last_error
clearError
public static native void clearError();Löscht den letzten Fehler dieses Threads.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_clear_error
invoke
public static native String invoke(String requestJson);Die gesamte API hinter einem JSON-Aufruf, für Brücken, die nur Strings übergeben: {"fn":"to_xlsx","args":[handle]} liefert {"ok":true,"result":...} oder {"ok":false,"error":"..."}. Dokumente sind Handle-Nummern und Byte-Puffer Base64.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_invoke
registerStandardFont
public static native boolean registerStandardFont(byte[] fontBytes);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 Schrift ist.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_register_standard_font
hasBundledFonts
public static native boolean hasBundledFonts();1, wenn die Liberation-Schriften einkompiliert sind, 0 in den leichteren Builds.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_has_bundled_fonts
free
public static native void free(long handle);Gibt ein Dokument frei.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_free
Öffnen und Speichern
openBytes
public static native long openBytes(byte[] pdfBytes);Öffnet ein PDF aus Bytes. JPEG-, PNG- und TIFF-Bilder werden ebenfalls akzeptiert (eine Seite pro Bild).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_open_bytes
openBytesWithPassword
public static native long openBytesWithPassword(byte[] pdfBytes, String password);Öffnet ein verschlüsseltes PDF mit seinem Benutzer- oder Besitzerpasswort (RC4, AES-128, AES-256). Schlägt mit „password required“ oder „incorrect password“ fehl, wenn das Passwort das Problem ist.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_open_bytes_with_password
fromHtml
public static native long fromHtml(String html);Layoutet HTML als neues PDF-Dokument.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_from_html
openOffice
public static native long openOffice(byte[] data);Konvertiert Word-, Excel- oder PowerPoint-Bytes (Format wird erkannt) in ein neues PDF-Dokument.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_open_office
openEbook
public static native long openEbook(byte[] data);Konvertiert EPUB, FictionBook (.fb2, .fb2.zip), XPS/OpenXPS oder ein CBZ-Comic-Archiv in ein neues PDF-Dokument.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_open_ebook
openImage
public static native long openImage(byte[] data);Konvertiert JPEG-, PNG- oder TIFF-Bytes in ein neues PDF, eine Seite pro Bild.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_open_image
saveBytes
public static native byte[] saveBytes(long handle);Das Dokument mit jeder Änderung als PDF-Bytes (vollständiges Neuschreiben).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_save_bytes
saveLinearized
public static native byte[] saveLinearized(long handle);Ein linearisiertes („Fast Web View“) PDF: Die erste Seite wird angezeigt, bevor der Download endet.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_save_linearized
Seiten und Rendering
pageCount
public static native int pageCount(long handle);Anzahl der Seiten.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_count
pageWidth
public static native double pageWidth(long handle, int pageIndex);Angezeigte Seitenbreite in Punkt (Beschnittrahmen, Drehung und /UserUnit berücksichtigt).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_width
pageHeight
public static native double pageHeight(long handle, int pageIndex);Angezeigte Seitenhöhe in Punkt (Beschnittrahmen, Drehung und /UserUnit berücksichtigt).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_height
pageViewJson
public static native String pageViewJson(long handle, int pageIndex);Wie die Seite angezeigt wird: width, height, rotation, user_unit, crop und die Matrix von PDF zu Anzeige to_display.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_view_json
renderPagePng
public static native byte[] renderPagePng(long handle, int pageIndex, double dpi);Rendert eine Seite mit der angegebenen Auflösung (Punkte pro Zoll) als PNG. Nicht lizenzierte und Test-Renderings tragen ein Wasserzeichen.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_render_page_png
renderThumbPng
public static native byte[] renderThumbPng(long handle, int pageIndex, int maxDim);Rendert eine PNG-Miniaturansicht, deren längere Seite höchstens max_dim Pixel misst.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_render_thumb_png
setOverprint
public static native boolean setOverprint(long handle, int mode);Überdruckensimulation für spätere Renderings: 0 = nur PDF/X-Dokumente (Standard), 1 = immer, 2 = nie.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_set_overprint
Text, Suche und Assistent
extractPageText
public static native String extractPageText(long handle, int pageIndex);Der Text einer Seite in Lesereihenfolge.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_extract_page_text
extractMarkdown
public static native String extractMarkdown(long handle);Das ganze Dokument als Markdown (Überschriften, Listen, Tabellen).
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_extract_markdown
searchJson
public static native String searchJson(long handle, String query);Findet einen Text auf jeder Seite (ohne Beachtung der Groß-/Kleinschreibung). Liefert ein JSON-Array von Treffern: page, context und das Rechteck llx, lly, urx, ury in PDF-Punkten.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_search_json
pageBlocksJson
public static native String pageBlocksJson(long handle, int pageIndex);Die Textblöcke einer Seite als JSON: text, Schriftsize und das Rechteck llx, lly, urx, ury.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_blocks_json
askDocument
public static native String askDocument(long handle, String question, int k, int maxChars);Retrieval des Dokumentassistenten, offline (BM25): die k für eine Frage relevantesten Passagen und ein seitenmarkierter Kontext mit höchstens max_chars Zeichen (0 = 200000), der an ein Sprachmodell gesendet wird. Liefert {"passages":[{"page","text","score"}],"context":"...","context_pages":[...]}.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_ask_document
Konvertierung
toHtml
public static native String toHtml(long handle);Das Dokument als HTML.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_html
toJson
public static native String toJson(long handle);Der Dokumentinhalt als JSON.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_json
toXml
public static native String toXml(long handle);Der Dokumentinhalt als XML.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_xml
toCsv
public static native String toCsv(long handle);Tabellen des Dokuments als CSV.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_csv
toRtf
public static native String toRtf(long handle);Das Dokument als RTF.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_rtf
toDocx
public static native byte[] toDocx(long handle);Das Dokument als Word-Datei (.docx).
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_docx
toXlsx
public static native byte[] toXlsx(long handle);Das Dokument als Excel-Arbeitsmappe, ein Blatt pro Seite.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_xlsx
toPptx
public static native byte[] toPptx(long handle);Das Dokument als PowerPoint-Präsentation, eine Folie pro Seite.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_pptx
reflowHtml
public static native String reflowHtml(long handle, String optionsJson);Der Text als responsives HTML für kleine Bildschirme. Optionen (können weggelassen werden): {"pages":[0],"images":true,"full_page":true,"title":"..."}.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_to_reflow_html
Vorlagen
templateDocxToPdf
public static native long templateDocxToPdf(byte[] template, String dataJson, String optionsJson);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 fehlschlagen.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_template_docx_to_pdf
templateDocxFill
public static native byte[] templateDocxFill(byte[] template, String dataJson);Füllt eine Word-Vorlage mit JSON-Daten und liefert die neuen .docx-Bytes.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_template_docx_fill
templateHtmlToPdf
public static native long templateHtmlToPdf(String html, String dataJson, String optionsJson);Füllt eine HTML-Vorlage mit JSON-Daten (Werte HTML-maskiert, {{{raw}}} nicht) und layoutet sie als neues PDF-Dokument.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_template_html_to_pdf
templateFillPdf
public static native int templateFillPdf(long handle, String dataJson, String optionsJson);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 NexPdfJni (static) · Modul conversion · C nexpdf_template_fill_pdf
Strukturierte Extraktion und Barcodes
extractTablesJson
public static native String extractTablesJson(long handle, int pageIndex, String optionsJson);Tabellen mit und ohne Linien einer Seite (jede Seite, wenn der Index negativ ist) mit Zellen, Spans, CSV und Markdown. Optionen {"ruled","unruled","min_unruled_lines"}.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_extract_tables_json
extractKeyValuesJson
public static native String extractKeyValuesJson(long handle, String optionsJson);Beschriftungs-Wert-Paare aus dem Layout und typisierte Entitäten (Daten, Beträge, IBANs, E-Mail-Adressen, Telefonnummern, USt-IdNrn.) mit normalisierten Werten. Optionen {"pages","date_order"}.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_extract_key_values_json
extractionPromptJson
public static native String extractionPromptJson(long handle, String schemaJson, String optionsJson);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 NexPdfJni (static) · Modul conversion · C nexpdf_extraction_prompt_json
extractionValidateJson
public static native String extractionValidateJson(long handle, String schemaJson, String answerJson);Validiert eine Modellantwort gegen das Schema, wandelt Werte bei Bedarf um und verankert jeden Wert auf den Seiten: valid, value, errors, warnings, fields.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_extraction_validate_json
classifyDocumentJson
public static native String classifyDocumentJson(long handle, String labelsJson);Klassifiziert das Dokument anhand von Schlüsselwörtern in eines der angegebenen Labels, mit Scores und einem Prompt für die LLM-Klassifizierung.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_classify_document_json
readBarcodesJson
public static native String readBarcodesJson(long handle, int pageIndex, String optionsJson);Liest die Barcodes einer Seite (jede Seite, wenn der Index negativ ist): QR, Data Matrix, Aztec, PDF417, Code 128/39/93, EAN/UPC, ITF, Codabar und mehr, mit Positionen in PDF-Punkten.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_read_barcodes_json
readBarcodesImageJson
public static native String readBarcodesImageJson(byte[] image, String optionsJson);Liest die Barcodes eines PNG- oder JPEG-Bildes, mit Positionen in Pixeln.
Auf NexPdfJni (static) · Modul conversion · C nexpdf_read_barcodes_image_json
addBarcode
public static native boolean addBarcode(long handle, int pageIndex, double llx, double lly, double urx, double ury, String format, String text);Zeichnet Text als Vektor-Barcode (weißer Hintergrund, Ruhezone) in ein Rechteck einer Seite, in PDF-Punkten.
Auf NexPdfJni (static) · Modul editor · C nexpdf_add_barcode
Annotationen
addAnnotation
public static native boolean addAnnotation(long handle, 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-Annotationsuntertyp 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 NexPdfJni (static) · Modul annotations · C nexpdf_add_annotation
addInk
public static native boolean addInk(long handle, int pageIndex, String colorHex, double strokeWidth, double opacity, String coords);Fügt eine Freihand-Annotation hinzu. coords ist "x,y;x,y;..." in PDF-Punkten.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_add_ink
addLine
public static native boolean addLine(long handle, 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 hinzu (kind ist Line oder Arrow), von (x1, y1) nach (x2, y2) in PDF-Punkten.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_add_line
annotationsJson
public static native String annotationsJson(long handle, int pageIndex);Die Annotationen einer Seite als JSON: num, gen, kind, color, contents und das Rechteck.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_annotations_json
removeAnnotation
public static native boolean removeAnnotation(long handle, int pageIndex, int num, int gen);Entfernt die Annotation mit der Objektnummer num und der Generation gen von einer Seite.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_remove_annotation
moveAnnotation
public static native boolean moveAnnotation(long handle, int num, int gen, double dx, double dy);Verschiebt eine Annotation um (dx, dy) PDF-Punkte.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_move_annotation
setAnnotationContents
public static native boolean setAnnotationContents(long handle, int num, int gen, String contents);Ersetzt den Textinhalt einer Annotation.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_set_annotation_contents
exportXfdf
public static native String exportXfdf(long handle);Exportiert jede Annotation als XFDF-Dokument.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_export_xfdf
importXfdf
public static native int importXfdf(long handle, String xfdf);Importiert Annotationen aus einem XFDF-Dokument.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_import_xfdf
flattenAnnotations
public static native int flattenAnnotations(long handle, int pageIndex);Brennt Annotationen in den Seiteninhalt ein. Ein negativer Seitenindex verflacht jede Seite.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_flatten_annotations
addImageStamp
public static native boolean addImageStamp(long handle, int pageIndex, double llx, double lly, double urx, double ury, byte[] rgba, int width, int height, double opacity);Fügt eine Bildstempel-Annotation aus RGBA-Pixeln hinzu (Transparenz bleibt erhalten). 1 bei Erfolg.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_add_image_stamp
addMeasurement
public static native String addMeasurement(long handle, int pageIndex, String json);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 NexPdfJni (static) · Modul annotations · C nexpdf_add_measurement
measurementsJson
public static native String measurementsJson(long handle);Die gespeicherten Messungen als JSON.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_measurements_json
addFileAttachmentAnnot
public static native boolean addFileAttachmentAnnot(long handle, int pageIndex, double x, double y, String name, byte[] data, String mime, String description);Fügt eine Büroklammer-Annotation mit einer Datei hinzu; (x, y) ist die obere linke Ecke des Symbols in PDF-Punkten.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_add_file_attachment_annot
addInkSignature
public static native boolean addInkSignature(long handle, int pageIndex, String colorHex, double strokeWidth, String strokes);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 verwenden Sie eine PAdES-Signatur.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_add_ink_signature
replyToAnnotation
public static native int replyToAnnotation(long handle, int pageIndex, int num, int gen, String author, String text);Fügt eine Antwort von author zu einer Annotation (oder zu einer anderen Antwort) hinzu. Liefert die Objektnummer der Antwort (Generation 0).
Auf NexPdfJni (static) · Modul annotations · C nexpdf_reply_to_annotation
annotationRepliesJson
public static native String annotationRepliesJson(long handle, int pageIndex, int num, int gen);Der Thread unter einer Annotation, älteste zuerst: num, gen, in_reply_to, author, date, text, state, state_model.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_annotation_replies_json
setAnnotationState
public static native int setAnnotationState(long handle, int pageIndex, int num, int gen, String author, String state);Setzt einen Prüfstatus (Accepted, Rejected, Cancelled, Completed, None) oder Markierungsstatus (Marked, Unmarked) als verborgene Status-Antwort. Liefert ihre Objektnummer.
Auf NexPdfJni (static) · Modul annotations · C nexpdf_set_annotation_state
Formulare
formFieldsJson
public static native String formFieldsJson(long handle);Die Formularfelder als JSON: name, kind, value, page, Rechteck, read_only und required.
Auf NexPdfJni (static) · Modul forms · C nexpdf_form_fields_json
fillFormField
public static native boolean fillFormField(long handle, String name, String value);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 NexPdfJni (static) · Modul forms · C nexpdf_fill_form_field
addFormField
public static native boolean addFormField(long handle, 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 NexPdfJni (static) · Modul forms · C nexpdf_add_form_field
flattenForms
public static native int flattenForms(long handle);Brennt die Formularfelder in den Seiteninhalt ein.
Auf NexPdfJni (static) · Modul forms · C nexpdf_flatten_forms
recalculateForms
public static native int recalculateForms(long handle);Führt jedes Berechnungsskript aus; liefert, wie viele Felder sich geändert haben.
Auf NexPdfJni (static) · Modul forms · C nexpdf_recalculate_forms
exportFormJson
public static native String exportFormJson(long handle);Die Feldwerte als JSON-Objekt.
Auf NexPdfJni (static) · Modul forms · C nexpdf_export_form_json
importFormJson
public static native int importFormJson(long handle, String json);Füllt Felder aus einem JSON-Objekt mit Namen und Werten.
Auf NexPdfJni (static) · Modul forms · C nexpdf_import_form_json
exportFormFdf
public static native byte[] exportFormFdf(long handle, String pdfName);Die Feldwerte als FDF-Datei; pdf_name ist der darin festgehaltene Dateiname.
Auf NexPdfJni (static) · Modul forms · C nexpdf_export_form_fdf
importFormFdf
public static native int importFormFdf(long handle, byte[] fdf);Füllt Felder aus einer FDF-Datei.
Auf NexPdfJni (static) · Modul forms · C nexpdf_import_form_fdf
exportFormXfdf
public static native String exportFormXfdf(long handle, String pdfName);Die Feldwerte als XFDF.
Auf NexPdfJni (static) · Modul forms · C nexpdf_export_form_xfdf
importFormXfdf
public static native int importFormXfdf(long handle, String xfdf);Füllt Felder aus XFDF.
Auf NexPdfJni (static) · Modul forms · C nexpdf_import_form_xfdf
XFA-Formulare
xfaInfoJson
public static native String xfaInfoJson(long handle);Ob das Dokument XFA hat, ob es dynamisch ist, Feld- und Datenanzahlen sowie die XDP-Packets.
Auf NexPdfJni (static) · Modul forms · C nexpdf_xfa_info_json
xfaExportData
public static native String xfaExportData(long handle, String format);Die XFA-Daten als xml (Standard) oder flaches json ({"path":"value"}). Schlägt fehl, wenn das Dokument kein XFA hat.
Auf NexPdfJni (static) · Modul forms · C nexpdf_xfa_export_data
xfaImportData
public static native int xfaImportData(long handle, String data, String format);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 NexPdfJni (static) · Modul forms · C nexpdf_xfa_import_data
xfaToAcroform
public static native int xfaToAcroform(long handle);Konvertiert in ein reines AcroForm-PDF und entfernt XFA; dynamische Formulare werden auf neue Seiten gelayoutet, und Skripte laufen zuerst. Textfelder behalten ihren formatierten Anzeigewert als /V. Liefert die Anzahl der AcroForm-Felder.
Auf NexPdfJni (static) · Modul forms · C nexpdf_xfa_to_acroform
xfaFlatten
public static native int xfaFlatten(long handle);Konvertiert und verflacht das XFA-Formular: ein reines PDF mit gezeichneten Werten. Liefert die Anzahl der verflachten Widgets.
Auf NexPdfJni (static) · Modul forms · C nexpdf_xfa_flatten
xfaRemove
public static native int xfaRemove(long handle);Entfernt XFA und behält die AcroForm-Felder und Seiten: 1 entfernt, 0 kein XFA.
Auf NexPdfJni (static) · Modul forms · C nexpdf_xfa_remove
Seitenbearbeitung
rotatePage
public static native boolean rotatePage(long handle, int pageIndex, int degrees);Dreht eine Seite um ein Vielfaches von 90 Grad.
Auf NexPdfJni (static) · Modul editor · C nexpdf_rotate_page
deletePage
public static native boolean deletePage(long handle, int pageIndex);Löscht eine Seite.
Auf NexPdfJni (static) · Modul editor · C nexpdf_delete_page
duplicatePage
public static native boolean duplicatePage(long handle, int pageIndex);Fügt eine Kopie einer Seite nach dieser ein.
Auf NexPdfJni (static) · Modul editor · C nexpdf_duplicate_page
addBlankPage
public static native boolean addBlankPage(long handle);Hängt eine leere Seite an.
Auf NexPdfJni (static) · Modul editor · C nexpdf_add_blank_page
reversePages
public static native boolean reversePages(long handle);Kehrt die Seitenreihenfolge um.
Auf NexPdfJni (static) · Modul editor · C nexpdf_reverse_pages
movePage
public static native boolean movePage(long handle, int from, int to);Verschiebt die Seite bei from an den Index to.
Auf NexPdfJni (static) · Modul editor · C nexpdf_move_page
cropPage
public static native boolean cropPage(long handle, int pageIndex, double llx, double lly, double urx, double ury);Setzt den Beschnittrahmen einer Seite (PDF-Punkte).
Auf NexPdfJni (static) · Modul editor · C nexpdf_crop_page
extractPages
public static native long extractPages(long handle, int[] pageIndices);Ein neues Dokument aus den angegebenen Seiten (Teilen).
Auf NexPdfJni (static) · Modul editor · C nexpdf_extract_pages
appendDocument
public static native boolean appendDocument(long handle, long other);Hängt die Seiten eines anderen Dokuments an (Zusammenführen).
Auf NexPdfJni (static) · Modul editor · C nexpdf_append_document
insertImagePages
public static native int insertImagePages(long handle, int index, byte[] data);Fügt die Bilder einer JPEG-, PNG- oder TIFF-Datei als Seiten vor index ein (begrenzt; die Seitenzahl hängt an). Liefert die Anzahl der hinzugefügten Seiten.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_insert_image_pages
setPageBackground
public static native int setPageBackground(long handle, String optionsJson, byte[] rgb, int width, int 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 NexPdfJni (static) · Modul editor · C nexpdf_set_page_background
removePageBackground
public static native int removePageBackground(long handle, String pagesJson);Entfernt NexPDF-Hintergründe von den Seiten in pages_json ("[0,2]") oder von jeder Seite.
Auf NexPdfJni (static) · Modul editor · C nexpdf_remove_page_background
Inhaltsbearbeitung
pageContentJson
public static native String pageContentJson(long handle, int pageIndex);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 NexPdfJni (static) · Modul editor · C nexpdf_page_content_json
editText
public static native boolean editText(long handle, int pageIndex, String id, String changeJson);Bearbeitet eine Textzeile: {text?, size?, color?, dx?, dy?, family?, bold?, italic?}. Leerer Text löscht sie.
Auf NexPdfJni (static) · Modul editor · C nexpdf_edit_text
addPageText
public static native boolean addPageText(long handle, int pageIndex, String json);Fügt bearbeitbaren Seitentext hinzu: {text, x, y (baseline), size, color, family, bold, italic}.
Auf NexPdfJni (static) · Modul editor · C nexpdf_add_page_text
deleteContent
public static native boolean deleteContent(long handle, int pageIndex, String id);Löscht eine Textzeile oder ein Bild des Seiteninhalts.
Auf NexPdfJni (static) · Modul editor · C nexpdf_delete_content
transformImage
public static native boolean transformImage(long handle, int pageIndex, String id, double llx, double lly, double urx, double ury);Verschiebt oder skaliert ein Bild auf ein Rechteck (PDF-Punkte).
Auf NexPdfJni (static) · Modul editor · C nexpdf_transform_image
replaceImage
public static native boolean replaceImage(long handle, int pageIndex, String id, byte[] rgb, int width, int height);Ersetzt ein Bild durch RGB-Pixel (Breite x Höhe x 3 Bytes).
Auf NexPdfJni (static) · Modul editor · C nexpdf_replace_image
editTextBlock
public static native boolean editTextBlock(long handle, int pageIndex, String text, String colorHex, double fontSize, boolean bold, boolean italic, boolean 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 bereits vorhandenen Text.
Auf NexPdfJni (static) · Modul editor · C nexpdf_edit_text_block
Metadaten, Lesezeichen, Ebenen und Anhänge
metadataJson
public static native String metadataJson(long handle);Die Dokumentinformationen (Titel, Autor, Thema, Schlüsselwörter, ...) als JSON.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_metadata_json
setMetadata
public static native boolean setMetadata(long handle, String title, String author, String subject, String keywords);Setzt Titel, Autor, Thema und Schlüsselwörter. Weggelassene (null) Werte behalten den aktuellen.
Auf NexPdfJni (static) · Modul editor · C nexpdf_set_metadata
outlinesJson
public static native String outlinesJson(long handle);Die Lesezeichen als JSON: [{"title","page","children":[...]}].
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_outlines_json
setOutlinesJson
public static native boolean setOutlinesJson(long handle, String json);Ersetzt die Lesezeichen durch einen JSON-Baum derselben Form.
Auf NexPdfJni (static) · Modul editor · C nexpdf_set_outlines_json
pageLabelsJson
public static native String pageLabelsJson(long handle);Seitenbezeichnungen: {"labels":["i","ii","1"],"ranges":[{"start":0,"style":"roman","prefix":"","first":1}]}.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_page_labels_json
setPageLabelsJson
public static native boolean setPageLabelsJson(long handle, String rangesJson);Setzt die Bereiche der Seitenbezeichnungen ([] entfernt die Bezeichnungen). Stile: decimal, roman, ROMAN, letters, LETTERS, none.
Auf NexPdfJni (static) · Modul editor · C nexpdf_set_page_labels_json
layersJson
public static native String layersJson(long handle);Die Optional Content Groups (Ebenen): [{"num","gen","name","visible","printable"}].
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_layers_json
setLayerVisible
public static native boolean setLayerVisible(long handle, int num, int gen, boolean visible);Blendet eine Ebene ein oder aus.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_set_layer_visible
attachmentsJson
public static native String attachmentsJson(long handle);Die eingebetteten Dateien: [{"name","description","mime","size","page"}]; page ist null bei Dateien auf Dokumentebene.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_attachments_json
attachmentData
public static native byte[] attachmentData(long handle, String name);Die Bytes einer eingebetteten Datei.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_attachment_data
addAttachment
public static native boolean addAttachment(long handle, String name, byte[] data, String mime, String description);Bettet eine Datei auf Dokumentebene ein.
Auf NexPdfJni (static) · Modul editor · C nexpdf_add_attachment
removeAttachment
public static native boolean removeAttachment(long handle, String name);Entfernt eine eingebettete Datei.
Auf NexPdfJni (static) · Modul editor · C nexpdf_remove_attachment
Verschlüsselung, Wasserzeichen und Stempel
encryptAes256
public static native boolean encryptAes256(long handle, String userPw, String ownerPw);Verschlüsselt mit AES-256 mit einem Benutzerpasswort (zum Öffnen) und einem Besitzerpasswort.
Auf NexPdfJni (static) · Modul security · C nexpdf_encrypt_aes256
encryptWithPermissions
public static native boolean encryptWithPermissions(long handle, String userPw, String ownerPw, int permissions);Verschlüsselt mit AES-256 und einer Berechtigungsmaske: Drucken 1, Ändern 2, Kopieren 4, Annotieren 8, Formulare ausfüllen 16, Zusammenstellen 32.
Auf NexPdfJni (static) · Modul security · C nexpdf_encrypt_with_permissions
securityJson
public static native String securityJson(long handle);Der Verschlüsselungszustand: {"encrypted","revision","owner","print","modify","copy","annotate","fill_forms","assemble"}.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_security_json
removePassword
public static native boolean removePassword(long handle, String ownerPassword);Entfernt den Schutz. Benötigt Besitzerzugriff: Das Dokument wurde mit dem Besitzerpasswort geöffnet, oder übergeben Sie es hier.
Auf NexPdfJni (static) · Modul security · C nexpdf_remove_password
addWatermark
public static native boolean addWatermark(long handle, String text);Bringt ein Text-Wasserzeichen auf jeder Seite an.
Auf NexPdfJni (static) · Modul security · C nexpdf_add_watermark
removeWatermarks
public static native int removeWatermarks(long handle);Entfernt die von NexPDF hinzugefügten Wasserzeichen.
Auf NexPdfJni (static) · Modul security · C nexpdf_remove_watermarks
addHeaderFooter
public static native boolean addHeaderFooter(long handle, 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 NexPdfJni (static) · Modul security · C nexpdf_add_header_footer
addBates
public static native boolean addBates(long handle, String prefix, long start, int digits);Fügt Bates-Nummerierung hinzu: prefix, erste Nummer und Anzahl der Ziffern.
Auf NexPdfJni (static) · Modul security · C nexpdf_add_bates
Schwärzung
applyRedaction
public static native boolean applyRedaction(long handle, int pageIndex, double llx, double lly, double urx, double ury, boolean fillWhite);Entfernt Text, Bilder und Annotationen unter einem Rechteck dauerhaft und malt ein deckendes Feld darüber, schwarz oder weiß.
Auf NexPdfJni (static) · Modul redaction · C nexpdf_apply_redaction
redactMatches
public static native int redactMatches(long handle, String query, int mode, boolean 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 NexPdfJni (static) · Modul redaction · C nexpdf_redact_matches
Digitale Signaturen
signPades
public static native byte[] signPades(long handle, String signer, String reason, String location);Signiert mit einem neuen selbstsignierten Testzertifikat (PAdES B-B) und liefert die signierte Datei. Schreiben Sie die Bytes unverändert: Erneutes Speichern des Dokuments zerstört die Signatur.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_sign_pades
signPkcs12
public static native byte[] signPkcs12(long handle, byte[] p12, String password, String optionsJson);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 erzeugt.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_sign_pkcs12
pkcs12InfoJson
public static native String pkcs12InfoJson(byte[] p12, String password);Die Zertifikatszusammenfassung einer PKCS#12-Datei; schlägt bei falschem Passwort mit „incorrect password“ fehl.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_pkcs12_info_json
prepareExternalSignature
public static native byte[] prepareExternalSignature(long handle, byte[] cert, String optionsJson);Externes Signieren (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 beim PKCS#12-Signieren.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_prepare_external_signature
externalSignatureData
public static native byte[] externalSignatureData(byte[] prepared, byte[] cert);Externes Signieren, Schritt 2: die zu signierenden Bytes (DER-Signed-Attributes; signieren Sie deren SHA-256 bei Geräten, die einen Digest entgegennehmen).
Auf NexPdfJni (static) · Modul signatures · C nexpdf_external_signature_data
completeExternalSignature
public static native byte[] completeExternalSignature(byte[] prepared, byte[] cert, byte[] signature, int algorithm, String optionsJson);Externes Signieren, 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 NexPdfJni (static) · Modul signatures · C nexpdf_complete_external_signature
verifySignaturesJson
public static native String verifySignaturesJson(byte[] pdfBytes);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 NexPdfJni (static) · immer verfügbar · C nexpdf_verify_signatures_json
verifySignaturesWithRootsJson
public static native String verifySignaturesWithRootsJson(byte[] pdfBytes, String rootsPem);Verifiziert die Signaturen und behandelt die PEM-Zertifikate in roots_pem als Vertrauensanker.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_verify_signatures_with_roots_json
addLtv
public static native byte[] addLtv(byte[] pdfBytes);Fügt einer signierten Datei Langzeitvalidierungsdaten (DSS mit OCSP-Antworten und CRLs) hinzu.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_add_ltv
addDocumentTimestamp
public static native byte[] addDocumentTimestamp(long handle, String optionsJson);Fügt einen RFC-3161-Dokumentzeitstempel einer TSA hinzu (PAdES B-LTA). Optionen: {"tsa_url" (required),"hash","field","reserved","ltv"}; mit ltv gelangen zuerst die Validierungsdaten früherer Signaturen in das DSS. Liefert die neue Datei.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_add_document_timestamp
addDocumentTimestampBytes
public static native byte[] addDocumentTimestampBytes(byte[] pdfBytes, String optionsJson);Fügt den Bytes einer PDF-Datei einen Dokumentzeitstempel hinzu (zum Beispiel direkt aus dem Signieren). Dieselben Optionen. Liefert die neue Datei.
Auf NexPdfJni (static) · Modul signatures · C nexpdf_add_document_timestamp_bytes
prepareDocumentTimestamp
public static native byte[] prepareDocumentTimestamp(long handle, String optionsJson);Dokumentzeitstempel von Ihrer eigenen TSA oder Ihrem HSM, Schritt 1: das PDF mit einem leeren Zeitstempel (Optionen wie beim Hinzufügen, ohne tsa_url).
Auf NexPdfJni (static) · Modul signatures · C nexpdf_prepare_document_timestamp
documentTimestampRequest
public static native byte[] documentTimestampRequest(byte[] prepared, String hash);Dokumentzeitstempel, Schritt 2: der DER-kodierte TimeStampReq, der als application/timestamp-query an die TSA zu senden ist (Hash standardmäßig SHA-256).
Auf NexPdfJni (static) · Modul signatures · C nexpdf_document_timestamp_request
completeDocumentTimestamp
public static native byte[] completeDocumentTimestamp(byte[] prepared, byte[] token);Dokumentzeitstempel, Schritt 3: das mit Zeitstempel versehene PDF, aus der vorbereiteten Datei und dem TSA-Token (TimeStampResp oder TimeStampToken).
Auf NexPdfJni (static) · Modul signatures · C nexpdf_complete_document_timestamp
PDF/A, PDF/X und PDF/UA
convertPdfA
public static native boolean convertPdfA(long handle);Konvertiert das Dokument für die Archivierung in PDF/A (ISO 19005).
Auf NexPdfJni (static) · Modul standards · C nexpdf_convert_pdfa
convertPdfX
public static native boolean convertPdfX(long handle);Konvertiert das Dokument für den Druckdatenaustausch in PDF/X.
Auf NexPdfJni (static) · Modul standards · C nexpdf_convert_pdfx
autoTag
public static native String autoTag(long handle, String lang, boolean 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 NexPdfJni (static) · Modul standards · C nexpdf_auto_tag
validatePdfaJson
public static native String validatePdfaJson(long handle, String level);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 NexPdfJni (static) · Modul standards · C nexpdf_validate_pdfa_json
validatePdfuaJson
public static native String validatePdfuaJson(long handle);PDF/UA-Validierung (PDF/UA-1 oder PDF/UA-2, wenn deklariert), mit demselben Bericht wie die PDF/A-Validierung.
Auf NexPdfJni (static) · Modul standards · C nexpdf_validate_pdfua_json
convertPdfaLevel
public static native boolean convertPdfaLevel(long handle, String level);Konvertiert in eine gewählte PDF/A-Stufe (2b, wenn leer); Stufe A taggt das Dokument zuerst. 1, wenn das Ergebnis die Validierung besteht; andernfalls listet der Fehler die noch fehlschlagenden Klauseln auf.
Auf NexPdfJni (static) · Modul standards · C nexpdf_convert_pdfa_level
OCR
ocrJson
public static native String ocrJson(long handle, String optionsJson);Erkennt gescannte Seiten und fügt eine unsichtbare, durchsuchbare Textebene hinzu. Optionen (können weggelassen werden): {"engine":"auto|builtin|tesseract|neural","languages":"por+eng","dpi":300,"pages":[0],"force":false}. Liefert einen JSON-Bericht.
Auf NexPdfJni (static) · Modul ocr · C nexpdf_ocr
ocrLoadModel
public static native boolean ocrLoadModel(String optionsJson, byte[] model, String dictionary);Lädt ein neuronales OCR-Modell (ONNX) zur Laufzeit: {"kind":"detection"|"recognition"|"classification","languages","name","input_height","max_side"}; ein Erkennungsmodell benötigt sein Zeichenwörterbuch, ein Detektionsmodell oder ein Textrichtungs-Klassifikator (0°/180°) benötigt keines.
Auf NexPdfJni (static) · Modul ocr · C nexpdf_ocr_load_model
ocrModelsJson
public static native String ocrModelsJson();Die geladenen OCR-Modelle: kind, name, languages, symbols, size.
Auf NexPdfJni (static) · Modul ocr · C nexpdf_ocr_models_json
ocrUnloadModels
public static native int ocrUnloadModels(String languages);Entlädt die OCR-Modelle der angegebenen Sprachen (alle, wenn leer). Liefert die Anzahl der entfernten.
Auf NexPdfJni (static) · Modul ocr · C nexpdf_ocr_unload_models
Vergleichen, optimieren und Speicher
compareJson
public static native String compareJson(long a, long b, double dpi);Vergleicht zwei Dokumente (Text- und visuelle Unterschiede pro Seite) mit der angegebenen Auflösung, als JSON.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_compare_json
compareOverlayPng
public static native byte[] compareOverlayPng(long a, long b, int pageIndex, double dpi);Ein PNG-Overlay der visuellen Unterschiede einer Seite zweier Dokumente.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_compare_overlay_png
optimize
public static native String optimize(long handle);Optimiert das Dokument (entfernt nicht verwendete Objekte, komprimiert Streams neu); liefert einen JSON-Bericht.
Auf NexPdfJni (static) · Modul editor · C nexpdf_optimize
subsetFonts
public static native String subsetFonts(long handle);Reduziert die eingebetteten Schriften auf die Glyphen, die das Dokument verwendet (Subsetting); liefert einen JSON-Bericht.
Auf NexPdfJni (static) · Modul editor · C nexpdf_subset_fonts
trimMemory
public static native long trimMemory(long handle);Verwirft zwischengespeicherte Daten des Dokuments; liefert die freigegebenen Bytes.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_trim_memory
memoryUsageBytes
public static native long memoryUsageBytes(long handle);Ungefährer vom Dokument belegter Speicher, in Bytes.
Auf NexPdfJni (static) · immer verfügbar · C nexpdf_memory_usage_bytes
compareTextJson
public static native String compareTextJson(long oldHandle, long newHandle, String optionsJson);Wortweiser 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 NexPdfJni (static) · immer verfügbar · C nexpdf_compare_text_json
compareAnnotate
public static native byte[] compareAnnotate(long oldHandle, long newHandle, String optionsJson);Der wortweise 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 NexPdfJni (static) · immer verfügbar · C nexpdf_compare_annotate