> ## 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?: PageProperties;  // page layout, password for protected source files — see below
  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;
  split?: ConvertSplit;
  flatten?: boolean;
  userPassword?: string;
  ownerPassword?: string;
  allowPrinting?: boolean;
  allowCopying?: boolean;
  allowModifying?: boolean;
  allowAnnotating?: boolean;
  allowFillingForms?: boolean;
  allowAssembling?: boolean;
  embeds?: PathLikeOrReadStream[];
  embedsMetadata?: EmbedsMetadata;
  facturx?: FacturXOptions;
  outputFilename?: string;
  trace?: string;
  nativeWatermarkText?: string;
  nativeWatermarkColor?: number;
  nativeWatermarkFontHeight?: number;
  nativeWatermarkRotateAngle?: number;
  nativeWatermarkFontName?: string;
  nativeTiledWatermarkText?: string;
  webhook?: WebhookOptions;
  watermark?: PdfEngineWatermark;
  stamp?: PdfEngineStamp;
  rotate?: PdfEngineRotate;
});
```

```typescript theme={null}
type PageProperties = {
  password?: string;
  landscape?: boolean;
  nativePageRanges?: { from: number; to: number };
  exportFormFields?: boolean; // default true
  singlePageSheets?: boolean;
  allowDuplicateFieldNames?: boolean;
  exportBookmarks?: boolean; // default true
  exportBookmarksToPdfDestination?: boolean;
  exportPlaceholders?: boolean;
  exportNotes?: boolean;
  exportNotesPages?: boolean;
  exportOnlyNotesPages?: boolean;
  exportNotesInMargin?: boolean;
  convertOooTargetToPdfTarget?: boolean;
  exportLinksRelativeFsys?: boolean;
  exportHiddenSlides?: boolean;
  skipEmptyPages?: boolean;
  updateIndexes?: boolean; // default true
  addOriginalDocumentAsStream?: boolean;
};
```

Returns `Promise<Buffer>`. Supported input formats are listed in [Gotenberg’s LibreOffice route docs](https://gotenberg.dev/docs/8.x/convert-with-libreoffice/convert-to-pdf#supported-extensions). Each `files` entry is either a path string or `{ data, ext }` for in-memory content. See [Types](https://docs.chromiumly.dev/v6/reference/types.md) for `ConvertSplit`, `EmbedsMetadata`, `FacturXOptions`, `PdfEnginePermissions`, and other shared types.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.