Skip to content
ComPDF

Page Layout Mode

In certain formats, the page layout mode plays a key role in the quality of the converted document. ComPDF Conversion SDK supports two layout modes: Flow Layout and Box Layout.

  • Flow Layout: Uses paragraph indentations, columns, and tab positions to adjust the content. This layout is suitable for editable documents.
  • Box Layout: Places each element based on the original PDF coordinate system. This layout is suitable for documents requiring precise reproduction.

Page layout modes are commonly used for PDF to Word and PDF to HTML.

js
const PageLayoutMode = {
  BOX: 0,
  FLOW: 1
};

const options = {
  pageLayoutMode: PageLayoutMode.FLOW
};

const result = sdk.startPDFToWord(inputFilePath, "", outputFilePath, options);