ExtractStructuredDocument

Text, extraction, structured data

คำอธิบาย

สกัดช่วงหน้าเป็นเอกสาร JSON หนึ่งชุด, เอกสาร XHTML หนึ่งชุด หรือลำดับตาราง CSV ที่ตรวจจับได้

ไวยากรณ์

Delphi

Function TPDFlib.ExtractStructuredDocument(Const PageRange: WideString;
  Format, Options: Integer): WideString;

ActiveX

Function PDFlib::ExtractStructuredDocument(PageRange As String,
  Format As Long, Options As Long) As String

DLL

const wchar_t* DLExtractStructuredDocument(int InstanceID,
  const wchar_t* PageRange, int Format, int Options);
const char* DLExtractStructuredDocumentA(int InstanceID,
  const char* PageRange, int Format, int Options);

พารามิเตอร์

PageRangeA one-based page range such as 1-3,7, or an empty string for every page
FormatPDF_STRUCTURED_TEXT_JSON (0), PDF_STRUCTURED_TEXT_XHTML (1), or PDF_STRUCTURED_TEXT_CSV (2)
OptionsZero or PDF_STRUCTURED_TEXT_INCLUDE_STYLES (1)

ค่าที่ส่งคืน

JSON contains a versioned pages array and XHTML contains one semantic section per selected pageCSV contains only detected tables and is empty when no selected page has one

ช่วง, ฟอร์แมต หรือตัวเลือกที่ไม่ถูกต้อง และความล้มเหลวการสกัดใดๆ จะคืนสตริงว่าง

หมายเหตุ

เก็บเฉพาะโมเดลข้อความหน้าปัจจุบันไว้ระหว่างประกอบเอาต์พุต หน่วยความจำการสกัดสำหรับเรขาคณิตกับลำดับชั้นจึงตามหน้าที่ซับซ้อนที่สุดในช่วงที่เลือก ไม่ใช่ตามจำนวนหน้าเอกสาร

หน้าที่เลือกไว้ถูกคืนก่อนการเรียกจบความคืบหน้ากับการยกเลิกแบบร่วมมือใช้วงจรการทำงานเอกสารปกติ

LastErrorCode is 111 for invalid input and 515 when extraction fails

ดูเพิ่มเติม

ExtractStructuredPage, ExtractPageRangeText