process password protected pdf files

This commit is contained in:
Alex Turchyn
2024-01-14 23:22:41 +02:00
committed by Pete Matsyburka
parent a573545ead
commit e864e8a47f
9 changed files with 143 additions and 14 deletions
@@ -0,0 +1,19 @@
export default class extends HTMLElement {
connectedCallback () {
const input = document.createElement('input')
input.type = 'hidden'
input.name = 'password'
input.value = prompt('Enter PDF password')
this.form.append(input)
this.form.requestSubmit()
this.remove()
}
get form () {
return this.closest('form')
}
}