Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

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.

ruby
options = ComPDFKitConversion::ConvertOptions.new
options.page_layout_mode = ComPDFKitConversion::PageLayoutMode::FLOW

result = ComPDFKitConversion::Conversion.start_pdf_to_word(
  input_file_path,
  "",
  output_file_path,
  options
)