Migrate CEP to UXP

Hello Everyone!,
I am encountering an issue that I hope someone may have insights on. I developed a CEP extension that utilizes the “pdf-parse” library to read and extract PDF contents, and it was functioning as expected. However, the script is no longer performing correctly after migrating the same CEP extension to a UXP plugin.
For reference:

  • CEP Extension: Node version 16.16.0, pdf-parse version @1.1.1
  • UXP Plugin: Node version 20.10.0, pdf-parse version @1.1.1

Any guidance on resolving this issue would be greatly appreciated.

UXP does not have all the features of Node.js, and in particular has strong limits on file access. If there is code in pdf-parse that takes advantage of it, it will not work.

If the library claims to be a pure JavaScript PDF parser, it is more likely to work. However, UXP is not a perfect browser, so we cannot guarantee that it will work.

I have not tried using it, but Adobe exposes cloud-based services like the PDF Services API, which may be available.

2 Likes