Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Export a Markdown note as PDF #2678

Merged
merged 12 commits into from Mar 20, 2019
Merged

Export a Markdown note as PDF #2678

merged 12 commits into from Mar 20, 2019

Conversation

AgentEpsilon
Copy link
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
Member

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

@ZeroX-DG
Copy link
Member

@AgentEpsilon ping!

@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
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
Copy link

MihaelBercic commented Mar 13, 2019

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.

browser/components/MarkdownPreview.js Outdated Show resolved Hide resolved
@ZeroX-DG
Copy link
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.

Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

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

Thank you.
I’ll wait :)

@masa4u
Copy link

masa4u commented Jun 4, 2019

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF under 'Export As..'
6 participants