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

Contents of annotations not (completely) visible #10677

Closed
rakeshkasinathan opened this issue Mar 25, 2019 · 11 comments · Fixed by #10820
Closed

Contents of annotations not (completely) visible #10677

rakeshkasinathan opened this issue Mar 25, 2019 · 11 comments · Fixed by #10820

Comments

@rakeshkasinathan
Copy link

I have not used any external library, i have used acrobat reader to annotate, insert and delete. I had taken the screenshot form your demo link only. Here by i will attach my pdf file as well as screenshot of demo link which you have given in the GitHub.

Passasjeren_strukturert (4) 11.pdf

Screen Shot 2019-03-25 at 11 24 38 AM

Screen Shot 2019-03-25 at 11 24 48 AM

Originally posted by @rakeshkasinathan in #10672 (comment)

@THausherr
Copy link
Contributor

THausherr commented Mar 25, 2019

An ideal bug report contains three things: what you were doing, what you were expecting, and what happened instead.

What were you expecting?

@Snuffleupagus
Copy link
Collaborator

Please don't open multiple duplicate issues, but update the original one with all the necessary information instead and then that may be re-opened when enough information has been provided.

@timvandermeij
Copy link
Contributor

I agree with the comments above: what are you expecting? From the screenshots I really can't tell what the problem is. Is there text in the annotations that should not be there? Should there be more/less annotations? What is the rendering defect you're reporting?

@rakeshkasinathan
Copy link
Author

There are two issues:

  1. The comment in the insert mark (blue caret symbol) is not showing up in PDFjs. If you open the attached PDF in the Acrobat Reader, you would notice that both the insert icons have comments in them. These completely missing in PDFjs.

  2. In this sticky note comment at the start of the PDF, the original comment was "This is a test" and it has reply to comment "My reply". Only "My Reply" is showing up.

I have attached the PDF that I'm using to test for your reference.

Passasjeren_strukturert (4) 11.pdf

@timvandermeij timvandermeij changed the title I have not used any external library, i have used acrobat reader to annotate, insert and delete. I had taken the screenshot form your demo link only. Here by i will attach my pdf file as well as screenshot of demo link which you have given in the GitHub. Contents of annotations not (completely) visible Mar 27, 2019
@vlastimilmaca
Copy link
Contributor

vlastimilmaca commented Apr 1, 2019

Hi, there is missing implementation of some annotation features like InReplyTo (your 2. issue) and groups (your 1. issue).

This requires quite a lot of coding on both worker part and display part of pdfjs. I tried to implement the worker part, so I can provide that as merge request (https://github.com/vlastimilmaca/pdf.js/tree/annotations-enhanced-parsing), but there's gonna be some extensive coding work on display part too. I think, there will have to be some kind of side-bar (like bookmarks, attachments etc) for displaying markup annotations as discussion threads. In page area, on mouseover, there should be displayed first comment + info about how many replies and states it has (which will probably need some localized text ... not easy ...). On click, it should open discussion sidebar and focus to correct annotation thread. But that is how I see it and it will be quite a lot of work to get it done right. But worker part is probably first step ... It should not break display part, so display part work can start later.

To reply to your issues:

  1. That annotation's content is defined in another annotation, which belongs to same group as master annotation. Master annotation should inherit some properties from it's child annotations Master annotation provide properties for child annotations and child annotations should inherit them from master, but this is not implemented yet.

  2. Now, when annotation has a reply, it is rendered into page as any other annotation and because it has same size and location, it hides it's parent, so only last reply is visible (but others are beneath).

@rakeshkasinathan
Copy link
Author

Do you need any more clarifications from my side.

@rakeshkasinathan
Copy link
Author

I understand that the above solution of for enhancing annotations with multiple response to a comments. We still have another outstanding issue. The insert comment with the blue caret symbol still does not display the comment it. How can we get to see the comment inside the insert comment in PDFjs.
Screen Shot 2019-04-05 at 3 45 26 PM

@vlastimilmaca
Copy link
Contributor

vlastimilmaca commented Apr 5, 2019

That should do the implementation of worker part I guess … It should correctly fill-in the master annotation with content and current display layer should display it just fine. I'll try to prepare merge request over weekend and we will se where we can get :).

Edit: So I looked into this again and it is little different then what I thought (sorry for that, it's been more than 2 months since I worked on this).

Worker thread will correctly fill child annotations, but child annotations should probably use master annotation's popup, so there will be need to make changes in viewer part or make some more changes in worker part. More in pull request.

@a7vickey
Copy link

a7vickey commented May 24, 2019

Hello,

How can i get CaretAnnotation,StrikeOutAnnotation position and text ranges.

55620969-e4297800-57b9-11e9-9ad0-bb40c3ce2427

@THausherr
Copy link
Contributor

For caret, use the /Rectangle entry. For strikeout, use the /QuadPoints entry. See also the PDF specification.
https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf
however the order of the quadpoints is wrong, see
https://stackoverflow.com/questions/9855814/pdf-spec-vs-acrobat-creation-quadpoints

@timvandermeij
Copy link
Contributor

The functionality is now in the API, so since the other points here are fixed I'm closing this with #10982 as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants