giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.31k stars 456 forks source link

Command line option to export a document as PDF doesn't work anymore. #2388

Open tsaphnat opened 8 months ago

tsaphnat commented 8 months ago

Mac OS Sonoma 14.1 CherryTree 1.0.2

Generated PDF cannot be opened The following command line create a PDF. But this PDF is corrupted and it cannot be opened. /usr/local/bin/cherrytree ~/document.ctd -n Information -w -p ~/

1) From CherryTree graphical interface create a document named document.ctd in home directory.

2) Write something in the created document in order not to leave it empty.

3) Execute the following command line: /usr/local/bin/cherrytree ~/document.ctd -n Information -w -p ~/

4) A non empty PDF has been created in home directory. But the generated document is corrupted. It canot be opened.

giuspen commented 7 months ago

Are you using homebrew or mac ports ? have you tried https://gitlab.com/dehesselle/cherrytree_macos/-/releases ?

tsaphnat commented 7 months ago

1. I cannot succeeded to attach the input CherryTree document bug.ctd That's why I sent you a photo of its content, the attached file: bug.ctd.png

bug ctd

2. In order to send you the input cherrytree document (reduced to one page only), I added the .txt extension just after file name: bug.ctd, then it gives: bug.ctd.txt. Don't forget to remove the .txt extension to recover initial document: bug.ctd Open it with CherryTree and generate the PDF of the whole tree. -- whatever option you use to generate the PDF you will be able to reproduce the bug -- Try to open the generated .pdf. It's impossible. It is corrupted. bug.ctd.txt

3. % brew -v
Homebrew 4.1.22 Homebrew/homebrew-core (git revision 96c81f87bbd; last commit 2023-12-02) Homebrew/homebrew-cask (git revision 484b485baf; last commit 2023-12-02)

% cherrytree --version CherryTree 1.0.2

giuspen commented 7 months ago

I cannot reproduce it in linux, I'll try later today on the only Mac OS I have working, Monterey. Could you in the meantime try the installer version https://gitlab.com/dehesselle/cherrytree_macos/-/releases so we understand if it's a library issue or something that can be fixed in cherrytree

tsaphnat commented 7 months ago

Giuseppe, Thanks a lot for workaroud. I am migrating from CherrTree to Obsidian (clean, sober and extremely modular) ? Available migrations tools and module works well. After you who is the free best successor to CherryTree? Thank you very much and best regards. Christian

Le dim. 3 déc. 2023 à 12:21, Giuseppe Penone @.***> a écrit :

I cannot reproduce it in linux, I'll try later today on the only Mac OS I have working, Monterey. Could you in the meantime try the installer version https://gitlab.com/dehesselle/cherrytree_macos/-/releases so we understand if it's a library issue or something that can be fixed in cherrytree

— Reply to this email directly, view it on GitHub https://github.com/giuspen/cherrytree/issues/2388#issuecomment-1837448939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMC2X44E4QDUZHH6JRODCTYHROC7AVCNFSM6AAAAAA67UBGHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGQ2DQOJTHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Christian Desbordes

tsaphnat commented 7 months ago

Giuseppe, the nobility of a computer application is knowing how to die. I think you should warmly recommend your users to use Obsidian. I believe you should provide all the necessary tools to allow users to painlessly migrate to this tool. I was developed in a past life, and I will be happy to help you. thank you and best regards.

giuspen commented 7 months ago

Thanks for the very useful tip Christian, I still find CherryTree useful for my personal use and a couple of users still like it so I will keep developing it 😄

giuspen commented 7 months ago

In upcoming v1.0.3 the problem of corrupted pdf won't happen anymore but the non ASCII links to files/folders won't work in the pdf. Those are supported only in Linux for now (the same happens on windows).

tsaphnat commented 7 months ago

Does exist a regular expression to search for non ascii characters on entire CherryTree active document, please?

giuspen commented 7 months ago

You are not losing the text of the link, it's just not clickable in the resulting pdf / clicking it won't open the file manager on that location. In future I'll try to debug the library (Cairo) responsible for this issue.

tsaphnat commented 7 months ago

And searching all the non-ascii characters before the pdf generation by typing: “[\x80-\xFF]” into the tool of CherryTree for searching in multiple nodes

giuspen commented 7 months ago

Eh but if you are French you will find utf-8 chars everywhere, you should limit the search in links targets but there is currently no way to search only in links

giuspen commented 7 months ago

If you are in a rush to generate a pdf you can build yourself the latest from GitHub as described in the readme. I will release anyway the new version this evening or tomorrow