Skip to content

Tag: pdf

Javascript: How to compare against substring in PDF forms?

I am trying to use some Javascript in a PDF form. As an example, let’s say I have two fields: let’s call them TextField1 and TextField2. These fields can be used independently, but when TextField1 has a certain value, I’d like TextField2 prefilled. This works fine (triggered onBlur, not that it matters): My problem is this: How can I compare

Merge PDF with PDF-LIB

I am trying to replicate the official example for merging 2 pdf files, but instead of hardcode the name of the file, I’d like to have the user upload two files. The code works well when the filename …

How do I retrieve text from user selection in pdf.js?

This question is specific to pdf.js, a javascript based pdf renderer. I’m building a custom version where I need to extract the text that I select inside the pdf. There are other posts where you can fetch the text from one page or the whole pdf document such as the one here , but I’m looking to grab a specific