Comments (7)
Hi @sirupsen, thanks for the bug reports! Yes, performance is a bit of an issue. The majority of the time is spent on cropping the pages of the pdf to remove excess white space. After some profiling it seems that the expensive part of that operation is creating an image of a pdf page using the pdfplumber package and I don't see a way to avoid that (the reason this is done in Python at all is that the bounding box returned by pdfcrop isn't very accurate (4cb3af8)).
I did just push a commit (a2e833a) that speeds up using the --center
flag, but you don't use that in your example.
Alternatively, I could add a --no-crop
flag, which would speed up the process but lead to less nice results. Would that help?
from paper2remarkable.
Might it be possible to remove whitespace without converting to an image first? π
from paper2remarkable.
I'm not sure, it might be necessary to render the pdf to figure out what the page looks like. That said, there is a pdfparser package that links directly to libpoppler, which seems a lot faster but is not a drop-in replacement for the current method with pdfplumber. I'll look into this a bit more and see what I can do.
from paper2remarkable.
@sirupsen Thanks again for reporting this issue! I've just pushed some changes that give about an 8x speedup. I'll prepare a new release of the package soon.
from paper2remarkable.
Excellent!!! Iβll upgrade as soon as itβs released.
I do think a no crop flag would be useful. Some may prefer to have tools (change pen, highlight, etc) visible at all times β or perhaps the crop could leave just enough space to always have the tools available on the left side?
from paper2remarkable.
I do think a no crop flag would be useful. Some may prefer to have tools (change pen, highlight, etc) visible at all times β or perhaps the crop could leave just enough space to always have the tools available on the left side?
Try version 0.5.4, both a --no-crop
and a --right
option are now available! :)
from paper2remarkable.
π
from paper2remarkable.
Related Issues (20)
- Keep internal links HOT 3
- Optionally add margin HOT 2
- New source recommendations HOT 2
- Suggestion: add example conversion to Readme. HOT 2
- Math symbols are not converted HOT 2
- [Errno 2] No such file or directory
- Hanging on removing timestamp HOT 10
- GLib-GObject-CRITICAL error when copying a website HOT 3
- pdf not found on remarkable
- Specify local html file HOT 1
- "Could not build wheels for pikepdf" HOT 1
- Can't get -p option (or --remarkable-path) to work HOT 5
- Installation Struggles on MacOS HOT 1
- FileNotFoundError: [WinError 2] The system cannot find the file specified HOT 1
- support for providing a PDF directly as input? HOT 2
- Issue with connecting rmapi HOT 4
- Upload via the USB Web API instead of using rmapi HOT 1
- Transfer of multiple files with similar names HOT 2
- Any interest in making the provider code a standalone library? HOT 5
- adding blank pages fails HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paper2remarkable.