Giter Club home page Giter Club logo

go-remarkable2pdf's Introduction

go-remarkable2pdf

Go library to parse and render Remarkable lines files as PDF.

Usage

package main

import (
	"fmt"
	"os"

	rm2pdf "github.com/poundifdef/go-remarkable2pdf"
)

func main() {
    // Render a single .rm lines file as PDF
    input, _ := os.Open("4.rm")
    output, _ := os.Create("out.pdf")
    rm2pdf.RenderRmFile(input, output)
    output.Close()

    // Render a full Notebook file as PDF
    output, _ := os.Create("out.pdf")
    rm2pdf.RenderRmNotebook("Notebook.zip", output)
    output.Close()
}

Features Supported

  • Line thickness
  • Eraser
  • Highlighter
  • Multiple layers
  • Multiple pages
  • .rm lines file
  • Notebook .zip file

Not Currently Supported

  • Background templates (grid, lines, etc)
  • PDF annotations
  • ePUB
  • Layer naming and visibility
  • Line effects (ie, the painbrush shows "brush marks" based on the speed of your stroke)

Example Output

go-remarkable2pdf

Original

Contributing

  1. If you want to make any other modification or refactor: please create an issue and talk to me prior to making your PR. This way we can talk about the feature, approach, and my own ability to commit to reviewing and merging code.

  2. I don't guarantee that I will keep this repo up to date, or that I will respond in any sort of timely fashion! Your best bet for any change is to keep PRs small and focused on the minimum changeset to add your feature.

  3. Of course, you are welcome to fork, modify, and distribute this code with your changes in accordance with the LICENSE.

Acknowledgements

go-remarkable2pdf's People

Contributors

poundifdef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-remarkable2pdf's Issues

Converted pdf not to scale

The conversion rm to pdf
a) does scale up the drawing
b) scale slightly different in x and y direction

A rectangle 120mm x 120mm (rm)
gets scaled to width 165mm x height 160mm (pdf)

I guess a) is intentional. It would be nice though to have the option to keep the original size.
Scaling differently the width and height, b), should be avoided in my opinion.

render.go:
x-direction: 1404 / 8.5'' = 165.2 dpi
y-direction: 1872 / 11'' = 170.2 dpi
reMarkable device: 226.85 dpi

Note: tested with rm-convert

Howto compile rm2pdf

Reading the README.md I miss a description how to compile a binary file rm2pdf.
It would be helpful for people without golang experience to have some guidance.

Your project could be a useful tool for testing rm files (e.g. generated by drawj2d) without the need to upload to the device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.