Closed madhuputtam1992 closed 1 year ago
@Calixteman Please have a look at the suggestions above. I suppose at least of the idea would be nice additions to pdf.js. How do you like the ideas?
@madhuputtam1992 At the moment, the annotations are embedded deeply in the pdf.js code. You can modify them, and I can give you some guidance, but it's not that easy. Maybe a future version of my library can make this stuff more accessible to Angular developers. Have a look at this folder: https://github.com/stephanrauh/pdf.js/tree/bleeding-edge/src/display/editor. The current editors are implemented here.
[(drawEditorColor)]
attribute. If you want to do it yourself, you'd have to fork pdf.js. In the long run, that's cumbersome.[src]="undefined"
and set it to the proper URL after a short timeout again.Definitely, some ideas here are interesting: I shew them to the team. About mobile device, pdf.js is now used as the pdf viewer in Firefox for Android but we didn't plug the editing features exactly for the reason you're describing (and because we need some specific UI). But it's something we want to do in the second half of the year.
@Calixteman That's great news! Basically, my project is meant to be a shallow wrapper around pdf.js, so I try to implement add-ons only if I'm sure you guys aren't working on similar features. In other words, I'm happy you're so answering my questions so reliably and so fast!
@madhuputtam1992 I've learned the hard way not to make promises, but I'm considering implementing the highlighter (1) plus an API allowing you to plug in arbitrary Angular code which enables you to implement (4), plus attributes like [(drawEditorColor)]
, [(drawTextColor)],
[(drawEditorOpacity)], and
[(drawEditorThickness)]`. The names are subject to change because they sound a bit weird.
As for 2 and 6, I hope my hints do the trick for you.
Remains 5 (the eraser). That's definitely the domain of pdf.js, but in the meantime, my proposed highlighter-plus-callback should enable you to implement the feature yourself. I've already implemented a feature allowing you to remove editors. For some reason, I didn't find my implementation, so either I need to make it more accessible or to write proper documentation.
@stephanrauh thank you! for your response:) I am able to achieve Highlighter, Laser Pointer, Eraser and Reset but I am struggling to implement Callout functionality that's why I came to here and I tried in different approaches but no use.
Finally I decided to convert callout content to image and then show it on popup. To achieve this, I am using the html2canvas library to convert the content of the callout area to an image. "I hope this will work!"
Hello,
I would like to create new annotation tools and customise draw tool please suggest me how I can do this,
Annotation Tools - in order