PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
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.
In the ComPDF Conversion SDK, page layout modes are commonly used in the following format conversions:
This example demonstrates how to convert a PDF document to Word with Flow Layout and Box Layout:
inputFilePath := "***"
password := "***"
outputFileName := "***"
wordOptions := compdf.NewWordOptions()
wordOptions.LayoutMode = compdf.PageLayoutFlow
err := compdf.StartPDFToWord(inputFilePath, password, outputFileName, wordOptions, nil)
wordOptions.LayoutMode = compdf.PageLayoutBox
err = compdf.StartPDFToWord(inputFilePath, password, outputFileName, wordOptions, nil)