Open ibraude opened 4 years ago
Not sure if it will, but it might be helpful if you have a WIP PR for your current branch. Since those are made for discussing code.
The feature looks cool and I could definitely see it being useful for others!
It would be much helpful feature.
New Feature - Help Needed
I've started working on a new feature that is very useful for me and I thought it might be useful for other Boostnote users who read and summarize long texts.
The Feature
Import all annotations, highlights, and comments from a pdf file into a new Boostnote note.
For example:
I read a long document and highlight the main points as I go.![image](https://user-images.githubusercontent.com/48394109/67243388-18b40700-f460-11e9-9271-1253c74bb70f.png)
Then, instead of copy & pasting content to my summary in Boostnote, or constantly switching between windows, I can import the annotated pdf file to Boostnote:![image](https://user-images.githubusercontent.com/48394109/67243288-f326fd80-f45f-11e9-94d7-063e3ec9d07f.png)
This extracts all of the annotations from the pdf and opens a new note with the annotations in it.
This could be very useful for students or anyone that wants to summarize long texts.
Current behavior
This works perfectly in dev mode. However, when I compile and build, webpack throws multiple errors. the build is complete but the functionality of the new feature does not work.
I have started investigating the issue and I found the changing "webpack-production-config.js" to load pdfjs using raw-loader solves the
Module Parse Failed
error as so:And I know that the following code in
node_modules/pdf-dist/build/pdf.js
is the section that causes theWARNING in ./~/pdfjs-dist/build/pdf.js Critical dependencies: 9858:6-13 require function is used in a way in which dependencies cannot be statically extracted @ ./~/pdfjs-dist/build/pdf.js 9858:6-13
error:The code:
However, I could not find a solution to this problem.
Expected behavior
Pdf annotation extractor feature will work in production mode as it does in dev mode
Steps to reproduce
3.Build Boosnote to see the error
If anyone has any ideas regarding this issue I will really appreciate it.
Also, I would like to hear if this is a feature that other users find useful and if so I will make sure to develop it further and make a PR.
Thanks a lot 🙏
my package.json: