Comments (18)
hey @pulyaevskiy any update on this? :-)
Has anyone found a way to export the document to pdf or html?
thanks
from zefyr.
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.
@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.
Converting to PDF would be very helpful!
from zefyr.
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.
Nice, I'd love to see this actually happening
from zefyr.
@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.
hey @pulyaevskiy what do you think of the idea ?
If you have other plans in this area, i am happy to adapt.
from zefyr.
@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.
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.
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.
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.
@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.
@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.
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.
@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.
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.
@pulyaevskiy
Has anyone found a way to export the document to pdf?
And save as template file?
Thanks
from zefyr.
Related Issues (20)
- toolbar missing when click "Normal text" HOT 1
- inner list support required. HOT 3
- Chinese input method with word candidate box the wrong place and typing characters recognized the wrong way. HOT 5
- can ZefyrController provide a reset method, which reset to a new delta and clear old changes?
- Exception when moving caret to end of line using physical keyboard (Cmd+Right)
- How to add image picker
- Text loss with some Android keyboards HOT 5
- showing list after writing "@" HOT 4
- How to add image?
- Error: The getter 'textEditingActionTarget' isn't defined for the class '_ToggleInlineStyleAction'. HOT 1
- Dynamically Scroll to a particular heading in zefyr TextEditor.
- Flutter 2.10 upgrade copy/cut/paste not working
- The word selection always in bottom or some strange place when input chinese
- Feature request: ZefyrEmbedBuilder add ZefyrController parameter HOT 3
- Almost all controls in toolbar gone
- Detection of keypress
- Feature request: Removal of word as a whole
- Try correcting the name to the name of an existing setter, or defining a setter or field named 'textEditingValue'. HOT 5
- Change default text style
- 📣 Announcing Alternative Package
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 zefyr.