Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Export a Markdown note as PDF#2678

Merged
Rokt33r merged 12 commits into
BoostIO:masterfrom
AgentEpsilon:export-pdf
Mar 20, 2019
Merged

Export a Markdown note as PDF#2678
Rokt33r merged 12 commits into
BoostIO:masterfrom
AgentEpsilon:export-pdf

Conversation

@AgentEpsilon

Copy link
Copy Markdown
Contributor

Description

Adds an "Export to PDF" option for Markdown notes. This feature behaves consistently with the other export options - however, due to its use of a hidden Electron window, it runs asynchronously. I've added support for output formatters to return Promises in exportData.js to support this feature.

Additionally, I have fixed exportFolder.js to actually wait for all notes to export. This wasn't a problem when note exporting was synchronous, but now it seems the extra wait time was causing tests to fail.

screen shot 2018-12-03 at 17 09 12

Issue fixed

Fixes #2013.

Type of changes

  • ⚪ Bug fix (Change that fixed an issue)
  • ⚪ Breaking change (Change that can cause existing functionality to change)
  • 🔘 Improvement (Change that improves the code. Maybe performance or development improvement)
  • 🔘 Feature (Change that adds new functionality)
  • ⚪ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • ⚪ I have written test for my code and it has been tested
  • 🔘 All existing tests have been passed
  • 🔘 I have attached a screenshot/video to visualize my change if possible
@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label Dec 6, 2018
@ZeroX-DG

Copy link
Copy Markdown
Member

I can't export notes with images. Can you check?

Comment thread browser/components/MarkdownPreview.js
@ZeroX-DG

Copy link
Copy Markdown
Member
@ZeroX-DG ZeroX-DG added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Dec 19, 2018
@AgentEpsilon

Copy link
Copy Markdown
Contributor Author

Sorry for the long wait. Images were not working because I was passing the formatted html through a dataurl. I fixed this through a <base> tag in the htmlContentFormatter. I also destroy the render window after the export is finished.

@MihaelBercic

MihaelBercic commented Mar 13, 2019

Copy link
Copy Markdown

Hello, sorry if this question is not appropriate.

How can i add this to my BoostNote?
I only have .md, .txt and .html possible exports.

Thank you very much.

Edit: I'm using Windows Built application.

Comment thread browser/components/MarkdownPreview.js Outdated
@ZeroX-DG

Copy link
Copy Markdown
Member

@MihaelBercic It's still in progress and hasn't been merged into the main project so you have to wait for that. Sorry for the inconvenience.

@ZeroX-DG ZeroX-DG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@ZeroX-DG ZeroX-DG added approved 👍 Pull request has been approved by sufficient reviewers. and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Mar 20, 2019
@Rokt33r Rokt33r merged commit 2b29d96 into BoostIO:master Mar 20, 2019
@Rokt33r Rokt33r added this to the v0.11.15 milestone Mar 20, 2019
@Rokt33r Rokt33r removed approved 👍 Pull request has been approved by sufficient reviewers. labels Mar 20, 2019
@MihaelBercic

Copy link
Copy Markdown

Thank you.
I’ll wait :)

@masa4u

masa4u commented Jun 4, 2019

Copy link
Copy Markdown

export note to pdf not working on the windows version.

  • OS: Windows 7

error message:
Export error: Callback must be a function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

6 participants