wavewave / hoodle

hoodle : A pen notetaking program written in haskell
143 stars 12 forks source link

Export to PDF is broken in hoodle 0.4 #37

Open michamos opened 9 years ago

michamos commented 9 years ago

Hi, Export to PDF seems to be broken for me since version 0.4.

Steps to reproduce:

  1. Open any hoodle document (blank canvas will do)
  2. Choose File/Export to PDF
  3. Choose a filename ending in .pdf in the dialog
  4. Press OK

Expected result: a PDF file is created Actual result: nothing happens

Note that on the other hand, PDF annotation works without problem.

wavewave commented 9 years ago

Uh oh. Hoodle uses pdftk internally because of some bug in rendering to pdf in cairo.. So would you check this after installing pdftk? this external dep on pdftk is bad but I haven't found other workaround yet. Thanks for this report!

wavewave commented 9 years ago

anyway, I had better check pdftk in the system and do the fallback if not. The culprit line is https://github.com/wavewave/hoodle/blob/bb54a00f027a344328b13b7b7ca96911ccb84ab8/hoodle-publish/lib/Hoodle/Publish/PDF.hs#L339 It also needs some safe operation when exception happens.

michamos commented 9 years ago

Thanks, I did not have pdftk indeed. Now it works alright. It would be helpful if hoodle could give an error message instead of failing silently.

wavewave commented 8 years ago

apply documentation label. Will make a warning dialog box if pdftk is not available.

mardukbp commented 8 years ago

In order to get rid of the pdftk dependency I suggest to take a look at the PDF Writer library. It is used by the typesetting engine in TeXmacs, so it is probably suitable for hoodle.