Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Xournal++ compatibility #314

Closed
1 task done
Tracked by #440
CodeDoctorDE opened this issue Nov 21, 2022 · 10 comments · Fixed by #527
Closed
1 task done
Tracked by #440

[Feature request]: Xournal++ compatibility #314

CodeDoctorDE opened this issue Nov 21, 2022 · 10 comments · Fixed by #527
Assignees
Labels
enhancement Small enhancements to existing features good first issue Good for newcomers
Milestone

Comments

@CodeDoctorDE
Copy link
Member

CodeDoctorDE commented Nov 21, 2022

Is your feature request related to a problem? Please describe

It can be difficult to move to a new note taking app if you wrote in xournal++ before.

Additionally the xournal mobile app won't be updated anymore and Butterfly can have a compatibility layer for this.

Describe your feature request!

Add support for .xopp: https://github.com/xournalpp/xournalpp#file-format

Additional context

This is just an idea of what can be added to Butterfly.

Please upvote this issue if you find it useful, so I can know how much interest there is.

If you want to contribute, please read this

Code of Conduct

  • I agree to follow this project's Code of Conduct
@CodeDoctorDE CodeDoctorDE added enhancement Small enhancements to existing features future Ideas that have a low priority. labels Nov 21, 2022
@CodeDoctorDE CodeDoctorDE self-assigned this Nov 21, 2022
@CodeDoctorDE CodeDoctorDE pinned this issue Nov 21, 2022
@MrRulf
Copy link

MrRulf commented Dec 14, 2022

Since Xournal++ for desktop still gets updates (as far as I understood), would that compatibility layer mean butterfly can import xopp files, but if u do something else than reading you have to save it to a butterfly file or would you also be able to export it back to a xopp file? I'd love to continue using Xournal++ on desktop ^^"

@CodeDoctorDE
Copy link
Member Author

CodeDoctorDE commented Dec 14, 2022

It will be like the svg import/export function.
You will be able to import and export xopp files, but the format can change. If xournal++ saves additional data that butterfly documents don't have, you may loose them.
Butterfly is not meant to be "Xournal++ Mobile" 2.

@MrRulf
Copy link

MrRulf commented Dec 14, 2022

Sorry if it sounded like asking for "Xournal++ Mobile 2". That's not what I wanted, I think describing what I'm hoping for by comparing it to the way you can edit .docx documents with LibreOffice makes more sense.
I do not want Butterfly to turn into " Xournal++ Mobile", if we go into that direction a combination of the best of both worlds would be great.
I just think working on pdfs, what I mostly do, works better in xournal (today), so I'd love to keep using it and be able to read and maybe edit them on the go, without having to use a as it seems depricated app.
At the same time I prefer butterfly for other stuff, general notes where I write more than just filling out a pdf, so please keep those advantages.

@CodeDoctorDE
Copy link
Member Author

Yeah, this is my idea. I think when having a second xournal it will limit the things I can add.
More pdf support will come in 2.0. You will be able to select text in them, copy it, put filter on it (dark mode) and more (maybe also fill text fields). Stay tuned for the next updates

@MrRulf
Copy link

MrRulf commented Dec 15, 2022

If there's a big pdf update coming, allow me to make three suggestions :D

  1. make butterfly an option to open pdfs when u try to open a pdf on the phone (creates a new temporary note, u can write, u can save but most important, u can read the pdf and dont need another app for that on the phone)
  2. a more performant way to open/read pdfs, butterfly is having a hard time opening pdfs with many pages
  3. a non unlimited draw mode, with pages as replacement. Could generally help to stay better organized, but would be great for working with pdfs, because, depending on the implementation, only having the pdf page itself with maybe a little bit more paper on the right or so for small notes appears way better organized to me. It could also help with performance with big pdfs.

@CodeDoctorDE
Copy link
Member Author

Hi, thanks for your suggestions.

  1. This is already possible on desktop. On mobile, it's a bit difficult because of their sharing/file permission system.
  2. Yes I know. Currently all pages will be converted to pngs and that's not very performant. In the future, it will render only if the page is selected in the quality that it needs.
  3. This was my idea with areas. You can use the area painter to create, edit and delete it and if you try to export the pdf, you can choose which area you want to export. You still have an infinite canvas, but can choose which area you want to export

@MrRulf
Copy link

MrRulf commented Dec 15, 2022

  1. As far as I know apps need full file access or something, but I as far as I know that's a permission a user can grant. I know from a security/privacy/data protection standpoint it ain't the greatest when an app has full access to your files, but I don't remember seeing a pdf reader app able to do it's job without that permission. So it's probably the fault of the OS and shouldn't be something for an app to be concerned about. If somebody really is concerned about security like that he/she doesn't grant the permission anyway and other people just install another app that gets access because they "don't care". These are just my assumptions, I have barely scratched the surface of both, android development and flutter, so if there are other reasons I'd love to be corrected to learn :)
  2. Performance wise that sound's great :D
    But does that mean they keep being pngs? If so, is that just a solution until the 2.0 update u talked about, where you will be able to select text in pdfs etc. or is there a cool way to select text from pngs?
  3. Oh, then I'll give areas another shot, seems like I've approached it from the wrong perspective. Thanks :D

@CodeDoctorDE
Copy link
Member Author

  1. The play store doesn't like these permissions. But the preferred way is to use "Intents". With this you can also use the "share" dialog. I'm currently trying to add it https://developer.android.com/reference/android/content/Intent
  2. Currently they keep being pngs. The 2.0 update will change it to an extra type on the canvas. This is a breaking change so it doesn't make sense to put it in the 1.x. I need to look how I build the interface to keep it simple.
  3. Maybe I need to make them more intuitive, many features of the app are very hidden. For example the customizable background

@CodeDoctorDE CodeDoctorDE added the good first issue Good for newcomers label Jun 1, 2023
@CodeDoctorDE
Copy link
Member Author

CodeDoctorDE commented Jun 1, 2023

I added good first issue Good for newcomers to this issue if anyone wants to help me.

Some problems that can occur:

  • .xopp has a fileVersion attribute. We should notify the user that we only support the latest one

Here are a few rough steps of what to do:

  1. Documentation of file format .xopp xournalpp/xournalpp#2124 (comment) read the specification
  2. Add a new xopp.dart file in https://github.com/LinwoodDev/Butterfly/tree/develop/api/lib/src/converter
  3. Create a NoteData xoppMigrator(Uint8List data) method and implement the migration
  4. Optional: Create a Uint8List xoppExporter(NoteData document) to allow exporting to xopp
  5. Add import button for xopp files: https://github.com/LinwoodDev/Butterfly/blob/develop/app/lib/dialogs/add.dart#L177
  6. Optional: Add export button for xopp files: https://github.com/LinwoodDev/Butterfly/blob/develop/app/lib/views/app_bar.dart#L320 in the menu

Feel free to contribute to this project and implement this feature.
If you have questions feel free to use this issue or join the matrix or discord server.
If you start implementing this, please comment here and I will assign you to this issue so that not multiple people start working on this.

@CodeDoctorDE
Copy link
Member Author

I added xournal++ import feature in #527.
Please try it out and report bugs there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Small enhancements to existing features good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants