rmparse

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rmparse provides rendering of parsed .rm files to PDF

Package rmparse provides parsing for reMarkable v6 .rm files

Index

Constants

View Source
const (
	// reMarkable 2 tablet screen: 1404 x 1872 pixels at 226 DPI
	RMWidth  = 1404.0
	RMHeight = 1872.0

	// PDF page size (A5 portrait in points: 1pt = 1/72 inch)
	PDFWidth  = 420.0 // ~148mm
	PDFHeight = 595.0 // ~210mm

	// Scale factor from reMarkable coordinates to PDF points
	ScaleX = PDFWidth / RMWidth
	ScaleY = PDFHeight / RMHeight
)

reMarkable tablet dimensions and scaling

Variables

This section is empty.

Functions

func RenderToPDF

func RenderToPDF(rmFile *RMFile, outputPath string) error

RenderToPDF renders an RMFile to a PDF file

func RenderToPage

func RenderToPage(pdf *gopdf.GoPdf, rmFile *RMFile) error

RenderToPage renders an RMFile to an existing PDF page

Types

type BlockType

type BlockType uint32

BlockType represents the type of block in the .rm file

const (
	BlockTypeLayerDef  BlockType = 0x1010100 // Layer definition
	BlockTypeLayerName BlockType = 0x2020100 // Layer names
	BlockTypeTextDef   BlockType = 0x7010100 // Text definition
	BlockTypeLayerInfo BlockType = 0x4010100 // Layer info
	BlockTypeLineDef   BlockType = 0x5020200 // Line/stroke definition
)

Block type constants for different types of data in .rm files

type Layer

type Layer struct {
	ID    uint32 // Layer ID
	Lines []Line // Lines in this layer
}

Layer represents a layer with its lines

type Line

type Line struct {
	PenType   uint32  // Pen type
	Color     uint32  // Color
	BrushSize float32 // Brush size
	Points    []Point // Array of points
}

Line represents a stroke/line with multiple points

type PenColor

type PenColor struct {
	R, G, B uint8
}

PenColor maps pen color values to RGB

type Point

type Point struct {
	X         float32 // X coordinate
	Y         float32 // Y coordinate
	Speed     uint8   // Speed
	Width     uint8   // Width/thickness
	Direction uint8   // Direction/tilt
	Pressure  uint8   // Pressure
}

Point represents a single point in a stroke

type RMFile

type RMFile struct {
	Version string  // File version
	Layers  []Layer // Layers in the file
}

RMFile represents a parsed .rm file

func ParseRM

func ParseRM(filename string) (*RMFile, error)

ParseRM parses a reMarkable v6 .rm file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL