SimplePDF / simplepdf-embed

PDF editor in the browser – add text, checkboxes, pictures, signatures to PDF files. Merge, rotate PDF pages – iframe, script and React component
https://simplepdf.com/embed
MIT License
245 stars 27 forks source link

Feature Request : To read text contents from an embedded iframe #3

Open youngyeeer opened 1 year ago

youngyeeer commented 1 year ago

Hi! First of all I'd like to thank you for developing such an elegant solution for pdf editing!

I am a developer looking to enable copilot style capabilities on an uploaded PDF file. The thing is, I am currently unable to read the contents from the embedded iframe due to a cross-origin error.

User
Uncaught DOMException: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "mysite.com" from accessing a cross-origin frame.

I am wondering if there are any ways I could read the text out so that it could form part of my LLM prompt.

Thank you!

bendersej commented 1 year ago

Hey @youngyeeer!

Thanks for the kind words!

So that I better understand your feature request, could expand on it?

More specifically:

  1. Copilot style capabilities: do you expect to be able to retrieve the filled in details in real-time, or the document content would suffice?
  2. What is the end flow for customers: download the document, or submit it to you?

Have a great end of weekend!

Benjamin