Skip to content

Way to cut drag and drop selections from the pdf? #2924

Answered by skyleguy
skyleguy asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the advice! I was able to get this working out after a little while longer (did have to use AI to figure out that I was suffering from the concept of canvas scaling issues due to my retina screen where i was seeing my drag and drop not matching and the image i cut was scaled as well). But here is essentially what i have with a demo video

working-example.mov
onPageRendered(event: PageRenderedEvent) {
    const pageNumber = event.pageNumber;
    if (event.pageNumber) {
      if (!pageNumber) return;
      const pageDiv = document.querySelectorAll(`[data-page-number="${pageNumber}"]`)[1] as HTMLElement | null;
      if (!pageDiv) return;
      const canvas = pageDiv.query…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@skyleguy
Comment options

@stephanrauh
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by skyleguy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Solved user support You've got a question, or a misconfiguration, or simply need a hint how to get things up and running
2 participants