تهيئة مهام JSON
THPDFJobProcessor يقبل مستند JSON يصف عمليات PDF مرتبةً ويعيد نتيجة JSON بحالة لكل عملية
العمليات المدعومة
merge combines multiple input PDFs into a single output file using AppendPagesFromDocument
split extracts page ranges from an input PDF into separate output files using ExtractLoadedPagesToPDF
optimise recompresses FlateDecode and LZWDecode streams with a minimum savings threshold
encrypt applies AES-256, AES-128, RC4-128, or RC4-40 encryption with caller-specified passwords and key type
validate runs a built-in validation policy and returns the report text
ocr.layer creates searchable text through the default built-in ASCII engine or explicitly configured local Tesseract/RapidOCR CLI and DLL adapters; see تهيئة مهام OCR الخارجية
مخطط JSON
Input must contain one complete JSON value with valid separators, closed containers, valid string escapes, and only JSON whitespace outside strings; trailing content and numbers outside the finite Double range are rejected
المحلل يقبل 64 مستوى قيمة متداخلة كحد أقصى، عُدًّا القيمة الجذر أول مستوى؛ والمهام التالفة أو المتداخلة زائدًا تفشل قبل تنفيذ أي عملية، وتفرّج القيم المحللة جزئيًا
The input is an object with an operations array; each operation has a type field and type-specific parameters
The output is an object with a results array; each result carries type, status (ok, error, or skipped), and operation-specific fields
String values preserve escaped Unicode characters, including \u0000; finite numbers use a locale-independent decimal point and can be serialized outside the signed 64-bit range
Numeric values are stored as Double and follow the compiler runtime's floating-point conversion precision, so integers beyond its exact integer range can be rounded on input; GetInt and GetInt64 return the supplied default when the rounded value is outside their signed integer range
ميزانيات لكل عملية
Every operation can contain a budget object with memoryBytes, timeMilliseconds, objectCount, decompressionRatio, and outputBytes limits
{"operations":[{"type":"optimise","input":"in.pdf","output":"out.pdf",
"budget":{"memoryBytes":268435456,"timeMilliseconds":30000,
"objectCount":1000000,"decompressionRatio":200,"outputBytes":1073741824}}]}
A limit violation returns status=budget-exceeded plus metric, observed, limit, and elapsedMilliseconds without aborting later operations
ميزانيات الذاكرة تطبق أيضًا على محاسبة فك الترميز لكل تدفق وللمستند فيُحد التوسع قبل الاحتفاظ بمخازن كبيرة
واجهة المقبضات الشفافة
HPDFDocCreate returns an opaque THPDFDocHandle wrapping a THotPDF instance; HPDFDocLoadFromFile, HPDFDocGetPageCount, HPDFDocSaveLoadedDocument, and HPDFDocRunJob operate on the handle; HPDFDocDestroy releases it
مساعدات Pascal المتوافقة مصدريًا تبقى متاحة لمستدعي Delphi وC++Builder
ABI callback C المستقر لـ HotPDF يزود حد C المسطّح المسنود بالإصدارات لإدخال وصول عشوائي وإخراج متدفق وإلغاء وتقدم وتشخيصات ودورة حياة مقبضات شفافة