Closed bryanwac closed 7 months ago
Basically, you have two options:
<div>
or <canvas>
when catching the event (pageRendered)
or - probably even better - (annotationLayerRendered)
. Don't bother with renderer2
. Angular doesn't know anything about the internals of the PDF viewer, it's pure HTML5 country.Extending the annotation_editor_layer_builder
sounds attractive in the long term, but in the short term, that's too much work for me. It's always difficult to guess the direction the base library evolves. If I guess wrong, I'm in a hell of merge conflicts.
And Can I have this resizers by addint the canva by myself? Or do I need to add all the classes it normaly have to my built-in canva
Talking about new releases: at the moment, I'm trying to understand what the upcoming EU Cyber Resilience Act means for this project. More likely than not, it only means 20% more work for me. However, there's a small danger that ngx-extended-pdf-viewer falls into the same regulation as the Mozilla browser, and that'd be the end of the project.
Until I've read and understood the document (189 pages!), I'll stop implementing new features.
I'm afraid I can answer the question about resizers. The resizers themselves are simple CSS (or so I believe), but I haven't looked at the JavaScript implementation yet.
I'm not sure - are there still questions open?
While reading yours and pdfjs/mozilla docs, saw that we can manually create the divs for the layers, and by this, we can maybe create the canvas manually on TS for the images to become a canvas using something like renderer2 and adding it with the edittable = true to resize it. But I was not able to do taht :c can u help me with this or maybe tell me if this is upcomming on next releases? :D
refs: https://github.com/mozilla/pdf.js/blob/master/web/annotation_editor_layer_builder.js
somehow can manage to transform the images to canvas and inser like this: