Giter Club home page Giter Club logo

Comments (18)

Panthro avatar Panthro commented on August 16, 2024 6

hey @pulyaevskiy any update on this? :-)

Has anyone found a way to export the document to pdf or html?

thanks

from zefyr.

pulyaevskiy avatar pulyaevskiy commented on August 16, 2024 3

Thanks for the feedback @Panthro!

I’m planning to have more updates in January. This is not very high on the list yet but I’ll keep everyone posted when I get to this.

from zefyr.

 avatar commented on August 16, 2024 3

@Panthro
There is a PR that does conversion to HTML

SO from HTML, its easy to convert to PDF using the PDF Dart lib. There are a few out there.
I am bogged down with other stuff right now. If i had time it woudl be something i would do.
I dont think its that complex.

from zefyr.

leedstyh avatar leedstyh commented on August 16, 2024 2

Converting to PDF would be very helpful!

from zefyr.

 avatar commented on August 16, 2024 1

i found a nodejs quill-delta to html. It would be a good spec / example to work from.
https://www.npmjs.com/package/quill-delta-to-html

But again i dont know if its Notus that is the source format ?

from zefyr.

tth05 avatar tth05 commented on August 16, 2024 1

Nice, I'd love to see this actually happening

from zefyr.

lukepighetti avatar lukepighetti commented on August 16, 2024 1

@pulyaevskiy May I recommend exporting an interface for conversion, something like, ZefyrOutputDelegate (just made up the name), which can be implemented by any package. For example, it could result in zefyr_markdown, zefyr_pdf, zefyr_html, zefyr_hewn_stone_tablet, zefyr_smoke_signals, whatever.

Or perhaps notus_html etc.

And you would provide the converter/serializer when you create a new Zefyr widget.

from zefyr.

 avatar commented on August 16, 2024

hey @pulyaevskiy what do you think of the idea ?

If you have other plans in this area, i am happy to adapt.

from zefyr.

stemuk avatar stemuk commented on August 16, 2024

@gedw99 It would be really helpful to have such functionality for delta documents in flutter!

And while I believe that this functionality would be best implemented outside of the zefyr editor in a separate package, I would love to help with building such functionality or help with testing if you already have something in the making.

https://flutter.io/developing-packages/
This article would then go into detail on how to publish a package on pub.dartlang.org once it is ready.

from zefyr.

pulyaevskiy avatar pulyaevskiy commented on August 16, 2024

Sorry for late response here. I definitely think this is a valuable thing to do.

There is one thing I’m mostly concerned about which is bringing in too many dependencies into Zefyr or Notus. I’d like these packages to be lightweight and not force users downloads the rest of Pub with them.

I currently have basic markdown converter in notus, but I’m starting to consider stripping out into a separate notus_convert package. This package would also be a good place for HTML and PDF converters.

I can go ahead and set it up if this would help you guys to contribute.

Let me know your thoughts.

from zefyr.

 avatar commented on August 16, 2024

hey @pulyaevskiy thats the exact approach i would do also - converters.

SO to Print a Zefyr doc, your thinking zefyr --> Notus ( file ) --> Markdown --> PDF ?
https://github.com/memspace/zefyr/blob/master/packages/notus/lib/src/convert/markdown.dart

I would also like: zefyr --> Notus ( file ) --> PDF
Here is why..
Converting to Markdown is damn useful because you can then do anything with it. Save it into github, put on a webpage, etc etc
Converting from Notus --> PDF will ensure you have a pixel perfect match always.
Markdown is the lowest common denominator, but Notus to PDF will always be pure exact copy visually.

Also there is another reason too. Zefyr proves whats possible with Flutter in terms of highly interactive software. I think that Spreadsheets, Powerpoints and SVG Editors will be built with Flutter ongoing.
Especially since it runs on Desktop quite well now. All with collaboration possibilities thanks to quill.
For instance, so say i wanted to build an SVG Editor !
I would be taking your zefyr code and maybe using 40% of it to make a SVG Editor app.
Then build a Notus equivalent on top of quill package. Call it SVGNotus format.
Then for PDF export, i would look at the Notus --> PDF package and take x% of it too.
Basically its a 3 layer stack archi of:
a. Presentation
b. File Format / Serialisation
c. Export to PDF

You should keep Zefyr & Notus and the exporter light and focussed. i agree.
But i can see also a leaning towards one day abstracting some of Zefyr & Notus out to a core package maybe. I expect this will happen sometime down the road.

from zefyr.

 avatar commented on August 16, 2024

About Notus to PDF...
We will need to re-layout the zefyr document at some point because you need to calculate exact x and y positions for the PDF page size.
But Notus does not hold the x and y placement data. It only holds the structural relationship ?

SO to go from notus to pdf, how to calc the x and y ?
Seems maybe we have to use some of zefyr ?

See example: https://github.com/DavBfr/dart_pdf/tree/master/pdf

from zefyr.

stemuk avatar stemuk commented on August 16, 2024

@gedw99 Any progress on this feature so far? I would love to help with testing/prototyping since I believe most zefyr users would benefit in one way or another from having an export feature. After separating the notus_convert package as @pulyaevskiy mentioned the remaining work should be much easier since Markdown to PDF renders are already existing and a simple port to dart should do the trick.

from zefyr.

stemuk avatar stemuk commented on August 16, 2024

@pulyaevskiy I was lately looking into exporting a Zefyr document into Markdown using the Notus converter you mentioned above, but I had trouble finding it. Could you maybe quickly outline how to access the Markdown generated by the Notus markdown converter?

from zefyr.

 avatar commented on August 16, 2024

hey @stemuk Nothng on my side. Too many things going on. GO for it and please comment back here how you go.

Has the notus_convert package been seperated out yet though ?

from zefyr.

stemuk avatar stemuk commented on August 16, 2024

@gedw99 I will let you know if I make any progress on this side, for now I am focusing on exporting to Markdown though. As for the separation I think the notus_convert package has not yet been separated but I believe the basic markdown functionality should already be usable.

from zefyr.

Panthro avatar Panthro commented on August 16, 2024

My users are asking for this one, I successfully released a version of my app with "note taking" feature, but now people are asking for a way to "export" the notes with formatting :-)

from zefyr.

dedikusnadi207 avatar dedikusnadi207 commented on August 16, 2024

@pulyaevskiy
Has anyone found a way to export the document to pdf?
And save as template file?

Thanks

from zefyr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.