-
Notifications
You must be signed in to change notification settings - Fork 5
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
extract PDF bookmark with priority #66
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some minor issues to fix.
{ | ||
PDFElement pdfEl; | ||
string title; | ||
string author; | ||
string creationDate; | ||
string filePath; | ||
|
||
|
||
if (priority < 0 || priority > 100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Can you also add a LogTo.Error(...)
message since this should never happen ? That way a bug report will be sent if it does happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sorted.
PDF/PDFWindow.xaml.cs
Outdated
return; | ||
} | ||
|
||
IPDFViewer.ExtractBookmark(bookmark, result.Model.Value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a check for the Priority value provided by the user, like in your other Extract with priority PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I added a check and included an Alert window if the priority value is invalid.
PDF/Viewer/IPDFViewer.SuperMemo.cs
Outdated
@@ -225,7 +225,7 @@ protected ContentBase CreateImageContent(Image image, string title) | |||
|
|||
// PDF Extracts | |||
|
|||
protected bool CreatePDFExtract() | |||
protected bool CreatePDFExtract(double priority = -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is priority
never used ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I think I added that by mistake. I removed it in the latest commit.
Looks like there are some conflicts. Could you take a look whenever you have a moment ? |
Allows you to extract a bookmark from a PDF and specify the priority in a popup window.
There's also a menu item: