-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[api-minor][editor] Indicate, in the title, if the document has been edited (bug 1785854) #15351
Conversation
…edited (bug 1785854) Note that this patch prepends the document title with "* ", rather than only "*" as suggested in the bug, since there's nothing that says that a PDF document cannot specify a title[1] beginning with an asterisk. To reduce possible confusion, having a space between the "editing marker" and the actual document title thus cannot hurt as far as I'm concerned. In order to notify the viewer when all `AnnotationEditor`s have been removed, we utilize the existing `onAnnotationEditor`-callback to allow the document title to be updated as necessary. Finally, this patch makes the following (slightly unrelated) changes: - Rename the `AnnotationStorage.removeKey` method to just `AnnotationStorage.remove` instead. This is consistent with e.g. the `has`-method and should suffice to explain what it does. - Remove the `AnnotationStorage.hasAnnotationEditors` getter, since the viewer now tracks the necessary state internally. This avoids unnecessarily having to iterate through the `AnnotationStorage`-instance when saving/printing the document. --- [1] Using either an /Info dictionary or a /Metadata stream.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/1adf3ddf90313a1/output.txt |
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/e2e664d23217b49/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.241.84.105:8877/af3a293675599f9/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/1adf3ddf90313a1/output.txt Total script time: 2.12 mins Published |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/af3a293675599f9/output.txt Total script time: 4.99 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/e2e664d23217b49/output.txt Total script time: 10.20 mins
|
Works well; thanks! |
Note that this patch prepends the document title with "* ", rather than only "*" as suggested in the bug, since there's nothing that says that a PDF document cannot specify a title[1] beginning with an asterisk. To reduce possible confusion, having a space between the "editing marker" and the actual document title thus cannot hurt as far as I'm concerned.
In order to notify the viewer when all
AnnotationEditor
s have been removed, we utilize the existingonAnnotationEditor
-callback to allow the document title to be updated as necessary.Finally, this patch makes the following (slightly unrelated) changes:
AnnotationStorage.removeKey
method to justAnnotationStorage.remove
instead. This is consistent with e.g. thehas
-method and should suffice to explain what it does.AnnotationStorage.hasAnnotationEditors
getter, since the viewer now tracks the necessary state internally. This avoids unnecessarily having to iterate through theAnnotationStorage
-instance when saving/printing the document.[1] Using either an /Info dictionary or a /Metadata stream.