status = doc:SetPageLayout(layout)
doc:SetPageLayout()
sets how the pages should be displayed. If this attribute is not set, the setting of the viewer application is used.
layout
can be one of the following constants:
#HPDF_PAGE_LAYOUT_SINGLE:
#HPDF_PAGE_LAYOUT_ONE_COLUMN:
#HPDF_PAGE_LAYOUT_TWO_COLUMN_LEFT:
#HPDF_PAGE_LAYOUT_TWO_COLUMN_RIGHT:
When doc:SetPageLayout()
succeeds, it returns #HPDF_OK
. Otherwise, it returns an error code and the error handler is called.
#HPDF_INVALID_DOCUMENT
- An invalid document handle is set.
#HPDF_FAILED_TO_ALLOC_MEM
- Memory allocation failed.
#HPDF_PAGE_LAYOUT_OUT_OF_RANGE
- An invalid page layout is specified.