CheckDocumentStructure
Ιδιότητες εγγράφου (Document properties), Συμμόρφωση (Compliance)
Περιγραφή
Εκτελεί έλεγχο δομικής υγείας πάνω στο επιλεγμένο έγγραφο: κάθε αντικείμενο και stream εξαναγκάζεται μέσω του decoder του και τα ευρήματα επιστρέφονται ως αναφορά
Σύνταξη
Delphi
Function TPDFlib.CheckDocumentStructure: Integer;Τιμές επιστροφής
| 0 | Δεν έχει επιλεγεί έγγραφο |
|---|---|
| ID | A string list handle for GetStringListCount and GetStringListItem; release it with ReleaseStringList. |
Παρατηρήσεις
Each finding is one Level,Code,Object,Message line with level error, warning or info; the last line is a summary,... with error and warning counts, the number of objects and streams checked and the page resolution ratio. Reported conditions include objects that fail to parse (object-decode), plain Flate streams that are truncated or corrupt (stream-decode, verified strictly against the zlib end marker), a missing trailer or unresolvable document catalog, unsupported encryption handlers, unresolvable pages and documents whose cross-reference data was rebuilt from a byte scan (repaired).
Use it as an inexpensive pre-flight gate before archiving or batch processing; CheckFileCompliance covers standards conformance while this call covers structural integrity.
Παράδειγμα
ListID:= PDF.CheckDocumentStructure;
Last:= PDF.GetStringListItem(ListID, PDF.GetStringListCount(ListID));
if Pos('summary,0 errors', Last)<> 1 then
ShowMessage('structural problems found');
PDF.ReleaseStringList(ListID);Δείτε επίσης
CheckFileCompliance, CheckObjects, AuditDocumentSpace, GetDocumentRepaired