rnote
rnote copied to clipboard
Xournal++ File Import/Export
Just discovered your application and I am already loving it!! Keep up the good work. I don't what plans you have for this app but I was just thinking that xournal file import would be a great addition to this!
Thanks! I think that could be a good feature, but my file format is not that stable yet ( currently just a JSON dump if you look at the file in a text editor ) and I don't know how xournalpp does it so I don't know how compatible it is. But as a interim solution you could export the xournalpp file as a SVG and import it in rnote that way.
Hi!
Xournal++ developer here. If you want to understand how Xournal++ saves its .xopp-files, you should first consult the file format specification of the legacy Xournal .xoj file format. Xournal++'s .xopp-file format is a slightly enriched version of that. Looking at the code should also help.
From inspecting a unzipped .rnote file it seems to me that export to .xopp should not be too difficult.
I really like the modern look of rnote I must say. Keep up the good work!
Hello and thank you so much, will do!
Those links are very helpful, but I also came across https://github.com/xournalpp/xournalpp/issues/937 . It reads like this new format would be more compatible with rnotes embedded images and procedurally generated backgrounds and be generally more future proof.
Do you know if there are any ongoing efforts for a specification or better, for a file format library? I guess it would be written in c++ then, but I could interface with it with e.g. the cxx crate.
I would love to have Rnote to be able to import and export to xournalpp files actually
Currently none of the devs is working on the new file format. Unfortunately the dev who wanted to take this up after the 1.1.0 release can currently not contribute to open source projects. Other devs have other priorities. So either you work what the code base currently provides or you wait for indefinite time, until there is a file format library. I would recommend the first option.
Okay, at least good to know. Regarding the additions to the file format of xournal++, there is no documentation somewhere by any chance?
Okay, at least good to know. Regarding the additions to the file format of xournal++, there is no documentation somewhere by any chance?
Not directly. The best starting point is the XojExportHandler class in Xournal++ (see code) (for exports to Xournal's .xoj-format), which is dervied from the SaveHandler class (for saving .xopp-files) and overrides all methods which need different export/saving.
In recent times only (optional) layer names were added to the .xopp-file format.
In any case, if you write import or export to .xopp-files I would be willing to test and provide feedback.
Just giving an update. The basics work, but its still rough around the edges. Background and text is not yet implemented. Shapes are weird, ellipses look fine but the rest is not yet working. but the shape is retained when i export it back to .xopp. But since its actually usable imo, I already pushed it to main so it can be tested. xopp files can be dragged in or with the Import dialog, and exported with Export.. -> Export sheet as Xournal++ .xopp.

~~Just a heads up. Images in the xopp export currently only work with the resvg renderer backend. I disabled librsvg in the dev build because it was not compatible with the lastest gtk bindings, implemented the xopp export with the other backend and did not test it against librsvg when I added it back in. I guess I need automated tests~~
fixed with v0.3.1
I guess for importing shapes I need either a shape recognizer, or a new shape type "polyline", and import every stroke as that. Exploring shape recognizer algorithms could be fun, I might go that route if I have the time.
Shapes should now be imported correctly, as brush strokes are now made up of segments. What is still missing:
- dashed lines
- Background patterns
- Text
- Importing only linked PDFs and images
- DPI conversions on import. I'm not sure what is preferable: if the pages should be imported as the xournal spec's 72 DPI or converted by the current DPI settings in rnote.
It would be nice if rnote could register xournal-file support in the system on installation, so that xournal files can be opened directly with rnote. Currently, I have to explicitly tell the system to open the files with rnote. Doing that would make the transition from xournal to rnote easier.
Hm, not sure what you mean. You could simply change the default application for the application/x-xopp MIME-type, so that the files are opened by rnote.
If you are talking about associating all .xopp files with the application/rnote mime-type, I don't really want to do that and I am fairly certain distros would also see it as malicious. My intent is interoperability, not to lure people away from Xournal++.
Also, it is still an import, not a format that is native to rnote, both import and export are not completely "lossless".
Yes, thats what I meant. If you can set it without making it the preferred application (and in turn overriding xournal), that would be great.
Ah I see, application/x-xopp was missing as an entry in the desktop file