Comments (16)
maybe use pdf-poppler
from neutron.
Whats with the builtin PDF viewer of chromium?
from neutron.
I did not think about that. But the problem is that the PDF has to be displayed in the background of the drawing canvas. And it is also necessary to get the PDF as an image for the "export as image" function.
from neutron.
from neutron.
The PDF import is working already. I implemented it as a special case for background images.
This way I won't have to adjust the "export as image" and saving functionality.
But one annoying thing remains: The conversion takes some time. So a loader would be nice. The nicest way would be a small dialog, but it seems there is none built into electron for this job. So it will probably be a css animation over the whole <body>
.
from neutron.
The page numbers in the image file names are zero padded, which causes some issues.
With 238d7ed I tried to fix this behaviour. Although the images seem to be loaded correctly, there is an issue which I have not found yet and no idea where to look.
from neutron.
Whats the exact problem?
from neutron.
When I have a PDF with >=10 pages, the images of the pages are correctly loaded but then not drawn correcly onto the canvas used to construct the background image. As a result, the call of toDataUrl
(draw.js, l.505) returns a blank image.
from neutron.
So I found this which seems to be the issue.
It states that the function does not work if the canvas is too big, which it probably is in this case because I have a canvas 35363px in height.
from neutron.
But there is no real solution for this problem right?
from neutron.
If you have an idea, there will be. My only idea now would be maybe multiple background images. But I don't know how to implement that.
from neutron.
Or just a "real" pdf view
from neutron.
Well then there is the problem of saving it again...
from neutron.
from neutron.
I give up.
I removed all the code in 722693c. It will just not be reliable enough to work with long documents too.
from neutron.
I think with 0be7666, there might be a posibility for this again. Only problem would be how to store the PDF file alongside.
from neutron.
Related Issues (15)
- Switching between different applications HOT 2
- board content disappears HOT 8
- website german translation HOT 3
- Autoupdate HOT 3
- board scrolls while writing HOT 2
- Agenda 2019 HOT 4
- Grid in alpha HOT 2
- grid-content alignment HOT 2
- Scrollbar disappears in v 2.0.1 HOT 5
- Pen icon doesnโt disappear HOT 4
- Website - GitHub Pages HOT 3
- Error with open dialog HOT 1
- Error with opening files HOT 2
- Sponge frame HOT 1
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 neutron.