Skip to content
New issue

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

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

Already on GitHub? # to your account

[Feature Request] Pdf-docx export option #1387

Open
ghost opened this issue Nov 3, 2020 · 14 comments
Open

[Feature Request] Pdf-docx export option #1387

ghost opened this issue Nov 3, 2020 · 14 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2020

It would be a must have a good pdf - docx export option. At the end, the documents of most of the people are in docx and pdf.

@zDEFz
Copy link

zDEFz commented Nov 3, 2020

hard against. You open Pandoras Box. Then you'd also need to support OpenDocument Standards like...
ODT...

Not to mention, if you export from MS formats to OpenDocuments formats and back, the layout is broken. I'd rather not want to have it.

@cebas
Copy link

cebas commented Nov 3, 2020

this could be a good incentive to implement a plugin system that allows, among other stuff, to import/export from/to whatever format the plugin implementer wants
this will give more use cases to Trilium and more users and community support

@zDEFz
Copy link

zDEFz commented Nov 3, 2020

I agree with @cebas, but don't forget that this is really much todo.
What would that mean?

Is this about documents only?
Is this also for multi-media? Like movies, music etc? If so, implementation of FFMPEG might is problematic for some companies, cause it might give you licensing problems.

@zadam
Copy link
Owner

zadam commented Nov 3, 2020

This is sort of feature creep - these are not simple features and are only tangentially related to the focus of Trilium - note taking.

For docx there's an easy workaround - you can just open Word and paste the note's content into it and there you go - docx.

@cebas
Copy link

cebas commented Nov 6, 2020

I agree with @cebas, but don't forget that this is really much todo.
What would that mean?

Is this about documents only?
Is this also for multi-media? Like movies, music etc? If so, implementation of FFMPEG might is problematic for some companies, cause it might give you licensing problems.

Not only documents. My thoughts were about a generic plugin system that allows any kind of extension that the plugin system allows. This could start with import/export and grow to every other way @zadam wants to open a door to.

@zDEFz
Copy link

zDEFz commented Nov 6, 2020

I think you must explain more. This sounds to me, that you could do that by passing arguments to another executable file on windows / mac / linux.

@cebas
Copy link

cebas commented Nov 6, 2020

@zadam
Copy link
Owner

zadam commented Nov 6, 2020

@cebas in theory Trilium already has "plugins" - they are called "scripts". Trilium scripting API provides you access to the database and you can use that to export in whatever file format you wish.

There's a catch though - I doubt people will develop docx export from scratch and will want to use existing node.js libraries. And this is a problem since the set of libraries Trilium comes with is set at build time and cannot be extended. Trilium scripts are CommonJS-like modules and in theory some libraries could be shoe horned into scripts, I'm not sure how this would work in practice ...

@cebas
Copy link

cebas commented Nov 6, 2020

@zadam thanks for the explanation. I didn't notice these scripts are plugin-like. I have no experience with node, so I can't help on this, but I'm sure somebody else will.
You may need to find a way to develop scripts with extra node libraries. This may be needed to create complex plugins as the docx.

@wwwald
Copy link

wwwald commented Nov 9, 2020

There is always Pandoc for flexible file format conversion, based on Trilium's current HTML or Markdown export. See the demos page for example conversions, it includes docx as export option.

@zDEFz
Copy link

zDEFz commented Nov 9, 2020

I just checked the demo page and it doesn't convert files for me...

@wwwald
Copy link

wwwald commented Nov 10, 2020

Any error messages? Are you trying to execute on an HTML or Markdown export of Trilium?

Willing to help out, Pandoc has usually worked well for me over the past years.

@zDEFz
Copy link

zDEFz commented Nov 10, 2020

Nah, not at all. I thought I can import my files into that thing and get a PDF.
There was no function to import data and export data, just to parse for instance Markdown to HTML...

I mean, you are meant to renderNote the HTML file from the demo, and that's all you can use, no?

If it's different, write step-by-step please.

@eliandoran
Copy link
Collaborator

Implemented export as PDF in TriliumNext.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants