LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
pageinfo.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`
`#include <SketchUpAPI/color.h>`

Go to the source code of this file.

## Enumerations
enum | LOImageResolution { LOImageResolution_Low = 0, LOImageResolution_Medium, LOImageResolution_High, LONumImageResolutions }
| Defines the different settings available for image resolution. More...

## Functions
LO_RESULT | LOPageInfoGetWidth (LOPageInfoRef pageinfo, double *width)
| Gets the page width. More...
LO_RESULT | LOPageInfoSetWidth (LOPageInfoRef pageinfo, double width)
| Sets the page width. More...
LO_RESULT | LOPageInfoGetHeight (LOPageInfoRef pageinfo, double *height)
| Gets the page height. More...
LO_RESULT | LOPageInfoSetHeight (LOPageInfoRef pageinfo, double height)
| Sets the page height. More...
LO_RESULT | LOPageInfoGetLeftMargin (LOPageInfoRef pageinfo, double *margin)
| Gets the left page margin. More...
LO_RESULT | LOPageInfoGetRightMargin (LOPageInfoRef pageinfo, double *margin)
| Gets the right page margin. More...
LO_RESULT | LOPageInfoGetTopMargin (LOPageInfoRef pageinfo, double *margin)
| Gets the top page margin. More...
LO_RESULT | LOPageInfoGetBottomMargin (LOPageInfoRef pageinfo, double *margin)
| Gets the bottom page margin. More...
LO_RESULT | LOPageInfoSetLeftMargin (LOPageInfoRef pageinfo, double margin)
| Sets the left page margin. More...
LO_RESULT | LOPageInfoSetRightMargin (LOPageInfoRef pageinfo, double margin)
| Sets the right page margin. More...
LO_RESULT | LOPageInfoSetTopMargin (LOPageInfoRef pageinfo, double margin)
| Sets the top page margin. More...
LO_RESULT | LOPageInfoSetBottomMargin (LOPageInfoRef pageinfo, double margin)
| Sets the bottom page margin. More...
LO_RESULT | LOPageInfoGetPaperColor (LOPageInfoRef pageinfo, SUColor *color)
| Gets the page color. More...
LO_RESULT | LOPageInfoSetPaperColor (LOPageInfoRef pageinfo, const SUColor *color)
| Sets the page color. More...
LO_RESULT | LOPageInfoGetPrintPaperColor (LOPageInfoRef pageinfo, bool *print_paper_color)
| Gets whether or not the page color should be printed. More...
LO_RESULT | LOPageInfoSetPrintPaperColor (LOPageInfoRef pageinfo, bool print_paper_color)
| Sets whether or not the page color should be printed. More...
LO_RESULT | LOPageInfoGetMarginColor (LOPageInfoRef pageinfo, SUColor *color)
| Gets the color of the margins. More...
LO_RESULT | LOPageInfoSetMarginColor (LOPageInfoRef pageinfo, SUColor color)
| Sets the color of the margins. More...
LO_RESULT | LOPageInfoGetShowMargins (LOPageInfoRef pageinfo, bool *show_margins)
| Gets whether or not the margins are shown. More...
LO_RESULT | LOPageInfoSetShowMargins (LOPageInfoRef pageinfo, bool show_margins)
| Sets whether or not the margins are shown. More...
LO_RESULT | LOPageInfoGetPrintMargins (LOPageInfoRef pageinfo, bool *print_margins)
| Gets whether or not the margins should be printed. More...
LO_RESULT | LOPageInfoSetPrintMargins (LOPageInfoRef pageinfo, bool print_margins)
| Sets whether or not the margins should be printed. More...
LO_RESULT | LOPageInfoGetDisplayResolution (LOPageInfoRef pageinfo, LOImageResolution *resolution)
| Gets the value of the document's display resolution for images and raster models. More...
LO_RESULT | LOPageInfoSetDisplayResolution (LOPageInfoRef pageinfo, LOImageResolution resolution)
| Sets the value of the document's display resolution for raster rendered SketchUp models. More...
LO_RESULT | LOPageInfoGetOutputResolution (LOPageInfoRef pageinfo, LOImageResolution *resolution)
| Gets the value of the document's output resolution for raster rendered SketchUp models. More...
LO_RESULT | LOPageInfoSetOutputResolution (LOPageInfoRef pageinfo, LOImageResolution resolution)
| Sets the value of the document's output resolution for raster rendered SketchUp models. More...
LO_RESULT | LOPageInfoGetImageDisplayResolution (LOPageInfoRef pageinfo, LOImageResolution *resolution)
| Gets the value of the document's display resolution for images. More...
LO_RESULT | LOPageInfoSetImageDisplayResolution (LOPageInfoRef pageinfo, LOImageResolution resolution)
| Sets the value of the document's display resolution for images. More...
LO_RESULT | LOPageInfoGetImageOutputResolution (LOPageInfoRef pageinfo, LOImageResolution *resolution)
| Gets the value of the document's output resolution for images. More...
LO_RESULT | LOPageInfoSetImageOutputResolution (LOPageInfoRef pageinfo, LOImageResolution resolution)
| Sets the value of the document's output resolution for images. More...

## Enumeration Type Documentation

enum LOImageResolution

Defines the different settings available for image resolution.

Enumerator
LOImageResolution_Low | Low resolution, high efficiency.
LOImageResolution_Medium | Medium resolution, medium efficiency.
LOImageResolution_High | High resolution, low efficiency.
LONumImageResolutions |

## Function Documentation

LO_RESULT LOPageInfoGetBottomMargin | ( | LOPageInfoRef | pageinfo,
|  | double * | margin
| ) |  |

Gets the bottom page margin.

Parameters

  [in] | pageinfo | The page info object.
  [out] | margin | The bottom page margin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `margin` is NULL

LO_RESULT LOPageInfoGetDisplayResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution * | resolution
| ) |  |

Gets the value of the document's display resolution for images and raster models.

Parameters

  [in] | pageinfo | The page info object.
  [out] | resolution | The resolution.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `resolution` is NULL

LO_RESULT LOPageInfoGetHeight | ( | LOPageInfoRef | pageinfo,
|  | double * | height
| ) |  |

Gets the page height.

Parameters

  [in] | pageinfo | The page info object.
  [out] | height | The page height.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `height` is NULL

LO_RESULT LOPageInfoGetImageDisplayResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution * | resolution
| ) |  |

Gets the value of the document's display resolution for images.

Since
  LayOut 2023.1, API 8.1

Parameters

  [in] | pageinfo | The page info object.
  [out] | resolution | The resolution.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `resolution` is NULL

LO_RESULT LOPageInfoGetImageOutputResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution * | resolution
| ) |  |

Gets the value of the document's output resolution for images.

Since
  LayOut 2023.1, API 8.1

Parameters

  [in] | pageinfo | The page info object.
  [out] | resolution | The resolution.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `resolution` is NULL

LO_RESULT LOPageInfoGetLeftMargin | ( | LOPageInfoRef | pageinfo,
|  | double * | margin
| ) |  |

Gets the left page margin.

Parameters

  [in] | pageinfo | The page info object.
  [out] | margin | The left page margin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `margin` is NULL

LO_RESULT LOPageInfoGetMarginColor | ( | LOPageInfoRef | pageinfo,
|  | SUColor * | color
| ) |  |

Gets the color of the margins.

Parameters

  [in] | pageinfo | The page info object.
  [out] | color | The margin color.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `color` is NULL

LO_RESULT LOPageInfoGetOutputResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution * | resolution
| ) |  |

Gets the value of the document's output resolution for raster rendered SketchUp models.

Parameters

  [in] | pageinfo | The page info object.
  [out] | resolution | The resolution.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `resolution` is NULL

LO_RESULT LOPageInfoGetPaperColor | ( | LOPageInfoRef | pageinfo,
|  | SUColor * | color
| ) |  |

Gets the page color.

Parameters

  [in] | pageinfo | The page info object.
  [out] | color | The page color.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `color` is NULL

LO_RESULT LOPageInfoGetPrintMargins | ( | LOPageInfoRef | pageinfo,
|  | bool * | print_margins
| ) |  |

Gets whether or not the margins should be printed.

Parameters

  [in] | pageinfo | The page info object.
  [out] | print_margins | Whether the margins are printed or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `print_margins` is NULL

LO_RESULT LOPageInfoGetPrintPaperColor | ( | LOPageInfoRef | pageinfo,
|  | bool * | print_paper_color
| ) |  |

Gets whether or not the page color should be printed.

Parameters

  [in] | pageinfo | The page info object.
  [out] | print_paper_color | Whether or not the page color should be printed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `print_paper_color` is NULL

LO_RESULT LOPageInfoGetRightMargin | ( | LOPageInfoRef | pageinfo,
|  | double * | margin
| ) |  |

Gets the right page margin.

Parameters

  [in] | pageinfo | The page info object.
  [out] | margin | The right page margin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `margin` is NULL

LO_RESULT LOPageInfoGetShowMargins | ( | LOPageInfoRef | pageinfo,
|  | bool * | show_margins
| ) |  |

Gets whether or not the margins are shown.

Parameters

  [in] | pageinfo | The page info object.
  [out] | show_margins | Whether the margins are shown or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `show_margins` is NULL

LO_RESULT LOPageInfoGetTopMargin | ( | LOPageInfoRef | pageinfo,
|  | double * | margin
| ) |  |

Gets the top page margin.

Parameters

  [in] | pageinfo | The page info object.
  [out] | margin | The top page margin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `margin` is NULL

LO_RESULT LOPageInfoGetWidth | ( | LOPageInfoRef | pageinfo,
|  | double * | width
| ) |  |

Gets the page width.

Parameters

  [in] | pageinfo | The page info object.
  [out] | width | The page width.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `width` is NULL

LO_RESULT LOPageInfoSetBottomMargin | ( | LOPageInfoRef | pageinfo,
|  | double | margin
| ) |  |

Sets the bottom page margin.

Parameters

  [in] | pageinfo | The page info object.
  [in] | margin | The new bottom margin to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `margin` is less than 0 or greater than the page height

LO_RESULT LOPageInfoSetDisplayResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution | resolution
| ) |  |

Sets the value of the document's display resolution for raster rendered SketchUp models.

Parameters

  [in] | pageinfo | The page info object.
  [in] | resolution | The new resolution to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if the value of `resolution` is invalid

LO_RESULT LOPageInfoSetHeight | ( | LOPageInfoRef | pageinfo,
|  | double | height
| ) |  |

Sets the page height.

Parameters

  [in] | pageinfo | The page info object.
  [in] | height | The new page height to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `height` is less than 1 or greater than 200

LO_RESULT LOPageInfoSetImageDisplayResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution | resolution
| ) |  |

Sets the value of the document's display resolution for images.

Since
  LayOut 2023.1, API 8.1

Parameters

  [in] | pageinfo | The page info object.
  [in] | resolution | The new resolution to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if the value of `resolution` is invalid

LO_RESULT LOPageInfoSetImageOutputResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution | resolution
| ) |  |

Sets the value of the document's output resolution for images.

Since
  LayOut 2023.1, API 8.1

Parameters

  [in] | pageinfo | The page info object.
  [in] | resolution | The new resolution to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if the value of `resolution` is invalid

LO_RESULT LOPageInfoSetLeftMargin | ( | LOPageInfoRef | pageinfo,
|  | double | margin
| ) |  |

Sets the left page margin.

Parameters

  [in] | pageinfo | The page info object.
  [in] | margin | The new left margin to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `margin` is less than 0 or greater than the page width

LO_RESULT LOPageInfoSetMarginColor | ( | LOPageInfoRef | pageinfo,
|  | SUColor | color
| ) |  |

Sets the color of the margins.

Parameters

  [in] | pageinfo | The page info object.
  [in] | color | The new margin color to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object

LO_RESULT LOPageInfoSetOutputResolution | ( | LOPageInfoRef | pageinfo,
|  | LOImageResolution | resolution
| ) |  |

Sets the value of the document's output resolution for raster rendered SketchUp models.

Parameters

  [in] | pageinfo | The page info object.
  [in] | resolution | The new resolution to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if the value of `resolution` is invalid

LO_RESULT LOPageInfoSetPaperColor | ( | LOPageInfoRef | pageinfo,
|  | const SUColor * | color
| ) |  |

Sets the page color.

Parameters

  [in] | pageinfo | The page info object.
  [in] | color | The new page color.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `color` is NULL

LO_RESULT LOPageInfoSetPrintMargins | ( | LOPageInfoRef | pageinfo,
|  | bool | print_margins
| ) |  |

Sets whether or not the margins should be printed.

Parameters

  [in] | pageinfo | The page info object.
  [in] | print_margins | Whether the margins should be printed or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object

LO_RESULT LOPageInfoSetPrintPaperColor | ( | LOPageInfoRef | pageinfo,
|  | bool | print_paper_color
| ) |  |

Sets whether or not the page color should be printed.

Parameters

  [in] | pageinfo | The page info object.
  [in] | print_paper_color | Whether or not the page color should be printed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object

LO_RESULT LOPageInfoSetRightMargin | ( | LOPageInfoRef | pageinfo,
|  | double | margin
| ) |  |

Sets the right page margin.

Parameters

  [in] | pageinfo | The page info object.
  [in] | margin | The new right margin to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `margin` is less than 0 or greater than the page width

LO_RESULT LOPageInfoSetShowMargins | ( | LOPageInfoRef | pageinfo,
|  | bool | show_margins
| ) |  |

Sets whether or not the margins are shown.

Parameters

  [in] | pageinfo | The page info object.
  [in] | show_margins | Whether the margins should be shown or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object

LO_RESULT LOPageInfoSetTopMargin | ( | LOPageInfoRef | pageinfo,
|  | double | margin
| ) |  |

Sets the top page margin.

Parameters

  [in] | pageinfo | The page info object.
  [in] | margin | The new top margin to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `margin` is less than 0 or greater than the page height

LO_RESULT LOPageInfoSetWidth | ( | LOPageInfoRef | pageinfo,
|  | double | width
| ) |  |

Sets the page width.

Parameters

  [in] | pageinfo | The page info object.
  [in] | width | The new page width to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `pageinfo` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `width` is less than 1 or greater than 200