rmapi-js
    Preparing search index...

    Interface LegacyDocumentContent

    legacy document content can store tags as raw strings

    interface LegacyDocumentContent {
        coverPageNumber: number;
        cPages?: CPages;
        customZoomCenterX?: number;
        customZoomCenterY?: number;
        customZoomOrientation?: Orientation;
        customZoomPageHeight?: number;
        customZoomPageWidth?: number;
        customZoomScale?: number;
        documentMetadata: DocumentMetadata;
        dummyDocument?: boolean;
        extraMetadata: Record<string, string>;
        fileType: FileType;
        fontName: string;
        formatVersion?: number;
        keyboardMetadata?: KeyboardMetadata;
        lastOpenedPage?: number;
        lineHeight: number;
        margins?: number;
        orientation: Orientation;
        originalPageCount?: number;
        pageCount: number;
        pages?: string[] | null;
        pageTags?: PageTag[];
        redirectionPageMap?: number[];
        sizeInBytes?: string;
        tags?: string[];
        textAlignment: TextAlignment;
        textScale: number;
        transform?: Partial<
            Record<
                "m11"
                | "m12"
                | "m13"
                | "m21"
                | "m22"
                | "m23"
                | "m31"
                | "m32"
                | "m33",
                number,
            >,
        >;
        viewBackgroundFilter?: BackgroundFilter;
        zoomMode?: ZoomMode;
    }

    Hierarchy

    • CommonDocumentContent
      • LegacyDocumentContent
    Index

    Properties

    coverPageNumber: number

    which page to use for the thumbnail

    -1 indicates the last visited page, whereas 0 is the first page.

    cPages?: CPages

    [speculative] various other page metadata

    customZoomCenterX?: number

    the horizontal center of a customFit zoom

    An offset in device pixels from the horizontal center of the page (0 = centered, negative = left, positive = right). This and customZoomCenterY are in the page's own frame, so device orientation does not affect them.

    customZoomCenterY?: number

    the vertical center of a customFit zoom

    An absolute distance in device pixels from the top of the page (negative = up, positive = down); centering is half the page's rendered height.

    customZoomOrientation?: Orientation

    the orientation the customFit zoom was set in

    customZoomPageHeight?: number

    the rendered height of the pdf page, in device pixels

    Computed from the pdf page height in points and the device dpi as heightPt * dpi / 72; the dpi depends on the model (see deviceScreens).

    customZoomPageWidth?: number

    the rendered width of the pdf page, in device pixels

    customZoomScale?: number

    the scale for a customFit zoom

    customZoomScale = screenHeight / viewHeight in device pixels, normalized to 1:1 native pixels: at 1 the view is screen-tall, showing screenHeight / customZoomPageHeight of the page. reMarkable generally allows 0.5 to 5, but values outside that bound are still supported.

    documentMetadata: DocumentMetadata

    metadata about the author, publishers, etc.

    dummyDocument?: boolean

    It's not known what this field is for

    extraMetadata: Record<string, string>

    the largely contains metadata about what pens were used and their settings

    fileType: FileType

    the underlying file type of this document

    fontName: string

    the name of the font to use for text rendering

    The reMarkable supports five fonts by default: "Noto Sans", "Noto Sans UI", "EB Garamond", "Noto Mono", and "Noto Serif". You can also set the font to the empty string or omit it for the default.

    formatVersion?: number

    the format version, this should always be 1

    keyboardMetadata?: KeyboardMetadata

    [speculative] metadata about keyboard use

    lastOpenedPage?: number

    the last opened page, starts at zero

    lineHeight: number

    the line height

    The reMarkable uses three built-in line heights: 100, 150, 200, and uses -1 to indicate the default line height, but heights outside of these also work.

    margins?: number

    the document margin in pixels

    The reMarkable uses three built-in margins: 50, 125, 200, but other margins are possible. The reMarkable used to default to margins of 180.

    orientation: Orientation

    the document orientation

    originalPageCount?: number

    this specifies the number of pages, it's not clear how this is different than pageCount

    pageCount: number

    the number of pages

    pages?: string[] | null

    a list of the ids of each page in the document, or null when never opened

    pageTags?: PageTag[]

    the page tags for the document

    redirectionPageMap?: number[]

    a mapping from page number to page id in pages

    sizeInBytes?: string

    ostensibly the size in bytes of the file, but this differs from other measurements

    tags?: string[]

    the legacy tag names for this document

    textAlignment: TextAlignment

    text alignment for this document

    textScale: number

    the font size

    reMarkable uses six built-in text scales: 0.7, 0.8, 1, 1.2, 1.5, 2, but values outside of this range are valid.

    transform?: Partial<
        Record<
            "m11"
            | "m12"
            | "m13"
            | "m21"
            | "m22"
            | "m23"
            | "m31"
            | "m32"
            | "m33",
            number,
        >,
    >

    [speculative] a transform matrix, a. la. css matrix transform

    viewBackgroundFilter?: BackgroundFilter

    setting for the adaptive contrast filter

    off has no background filter, best for images, full page applies the high contrast filter to the entire page. If this is omitted, reMarkable will try to apply the filter only to text areas.

    zoomMode?: ZoomMode

    the zoom mode; customFit applies the customZoom* fields, the rest auto-fit