> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chromiumly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LibreOffice

> LibreOffice.convert() — convert office documents to PDF.

Static class. No constructor; call `LibreOffice.convert(options)`.

## convert(options)

```typescript theme={null}
import { LibreOffice } from "chromiumly";

const buffer = await LibreOffice.convert({
  files: (string | { data: Buffer | ReadStream; ext: string })[];
  properties?: { ... };  // page layout, password for protected source files
  pdfa?: PdfFormat;
  pdfUA?: boolean;
  merge?: boolean;
  metadata?: Metadata;
  losslessImageCompression?: boolean;
  reduceImageResolution?: boolean;
  quality?: number;  // 1–100, JPG export
  maxImageResolution?: 75 | 150 | 300 | 600 | 1200;
  initialView?: number;
  initialPage?: number;
  magnification?: number;
  zoom?: number;
  pageLayout?: number;
  firstPageOnLeft?: boolean;
  resizeWindowToInitialPage?: boolean;
  centerWindow?: boolean;
  openInFullScreenMode?: boolean;
  displayPDFDocumentTitle?: boolean;
  hideViewerMenubar?: boolean;
  hideViewerToolbar?: boolean;
  hideViewerWindowControls?: boolean;
  useTransitionEffects?: boolean;
  openBookmarkLevels?: number;
  downloadFrom?: DownloadFrom;
  flatten?: boolean;
  userPassword?: string;
  ownerPassword?: string;
  embeds?: PathLikeOrReadStream[];
  nativeWatermarkText?: string;
  nativeWatermarkColor?: number;
  nativeWatermarkFontHeight?: number;
  nativeWatermarkRotateAngle?: number;
  nativeWatermarkFontName?: string;
  nativeTiledWatermarkText?: string;
  webhook?: WebhookOptions;
  watermark?: PdfEngineWatermark;
  stamp?: PdfEngineStamp;
  rotate?: PdfEngineRotate;
});
```

Returns `Promise<Buffer>`. Supported input formats are listed in [Gotenberg’s LibreOffice route docs](https://gotenberg.dev/docs/convert-with-libreoffice/convert-to-pdf#supported-extensions). Each `files` entry is either a path string or `{ data, ext }` for in-memory content.
