Comments (6)
The first part seems to be a bug somewhere. The conversion is meant to export all shapes to bitmap images (afaik xournal++ does not support true svg import) that can be edited in xournal++ as images but they are consumed as part of the background instead.
I'm not sure yet where this comes, the difference between the rnote exported xml and a correct one where the image is not stuck in the background from xournal is not large, but I think I should be able to find the reason from that difference.
Matching xournal++ shapes should be feasible for a subset of shapes (not using the rough variant) that are simple enough (rectangles and lines seems relatively easy), I've yet to estimate if all of them are feasible though.
from rnote.
Well, I found the bug.
I had some weird things going on with the layer
attribute with things like
<layer>
<!-- image data ... -->
</layer>
<layer/>
so an odd number of delimiters. Removing the last one pushes the images out of the background.
Only opening a layer
element if there is some data associated with it seems to fix the issue.
from rnote.
That's odd that an empty layer element <layer/>
pushes the images into the background. I wonder if this is actually a bug in the file parsing in xournal++.
from rnote.
I think it's actually how xournal handles background images.
If there are multiple layers with no background, only <layer>
and </layer>
are used like in one of the test file (in their clear xml variant here :
https://github.com/xournalpp/xournalpp/blob/b0ce9574c17dbb31060abd9b215ed28db1e6f643/test/files/load/layer.xml#L6-L8
<layer>
<text font="Sans" size="12.00" x="171.75" y="122.25" color="black">l1</text>
</layer>
But the one that has an image background (https://github.com/xournalpp/xournalpp/blob/master/test/files/packaged_xopp/imgBackground/new.xopp) decompresses to
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.0.9">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="800.00" height="800.00">
<background type="pixmap" domain="attach" filename="attachments/bg_1.png"/>
<layer/>
</page>
</xournal>
with the <layer/>
. I'm not sure there is a comprehensive spec for the xournal file format other than reading the code and the parser.
So I think having only <layer> content </layer>
is intended for each layer that is not the background and the last one <layer/>
is reserved for the background ?
from rnote.
Actually, I think I'm mistaken.
@user032479798ADhiuh can you verify the layers of your xournal file ?
With both strokes and shapes, the shapes end up in a different layer so they are not selectable if you don't activate the correct layer. So it's probably more a usability issue with xournal (you can't select anything that is from another layer).
In that case, the "fix" I opened is still useful as it prevents empty layers from being created, and in the case of only shapes being present, there would always be an empty top layer that contains nothing and prevents shapes from being selected.
from rnote.
There's technically a mutli layer selection that doesn't work
See here for the xournal issue : xournalpp/xournalpp#2783
from rnote.
Related Issues (20)
- Lag HOT 5
- Crash when adding new workspace HOT 1
- Missing translations HOT 4
- Moving Capability for Toolbars HOT 1
- Web Frontend HOT 1
- PDF blurry inside rnote HOT 2
- Drawing cursor invisible. HOT 1
- Modified file on disk popup appears under bottom toolbar HOT 3
- Improve PDF `adjust-document` import option to import at view position HOT 3
- change doc-save-symbolic to floppy-disk like icon HOT 2
- Add preset page format setting HOT 1
- Page layout doesnt get fully persisted HOT 1
- Some errors with touch input
- Wacom pen tablet with windows Ink enabled cause pan + zoom to stop working HOT 4
- Can't open the file, shows error message "Opening file failed". Terminal output "Caused by: decompressing bytes failed" HOT 1
- Color Palette Not Showing Colors HOT 1
- Reduce User input Effort for "Reset Zoom to 100%" (e. g. via Keyboard shortcut or Graphics Tablet / Pen Buttons) HOT 1
- tablet's pen buttons not working properly
- Random crash HOT 1
- Rnote crash, Segmentation fault(Core dumped) HOT 4
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 rnote.