rmapi-js

    Interface DocumentContent

    content metadata, stored with the "content" extension

    This largely contains description of how to render the document, rather than metadata about it.

    interface DocumentContent {
        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[];
        pageTags?: PageTag[];
        redirectionPageMap?: number[];
        sizeInBytes: string;
        tags?: Tag[];
        textAlignment: TextAlignment;
        textScale: number;
        transform?: Record<
            "m11"
            | "m12"
            | "m13"
            | "m21"
            | "m22"
            | "m23"
            | "m31"
            | "m32"
            | "m33",
            number,
        >;
        viewBackgroundFilter?: BackgroundFilter;
        zoomMode?: ZoomMode;
    }
    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 center of the zoom for customFit zoom

    This is an absolute offset from the center of the page. Negative numbers indicate shifted left and positive numbers indicate shifted right. The units are relative to the document pixels, but it's not sure how the document size is calculated.

    customZoomCenterY?: number

    the center of the zoom for customFit documents

    This is an absolute number relative to the top of the page. Negative numbers indicate shifted up, while positive numbers indicate shifted down. The units are relative to the document pixels, but it's not sure how the document size is calculated.

    customZoomOrientation?: Orientation

    this seems unused

    customZoomPageHeight?: number

    this seems unused

    customZoomPageWidth?: number

    this seems unused

    customZoomScale?: number

    the scale for customFit documents

    1 indicates no zoom, smaller numbers indicate zoomed out, larger numbers indicate zoomed in. reMarkable generally allows setting this from 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[]

    a list of the ids of each page in the document

    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?: Tag[]

    document tags 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?: 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

    what zoom mode is set for the page

    MMNEPVFCICPMFPCPTTAAATR