Product Version: 9.1.0-2
Please give a brief summary of your issue:
When install in ubuntu 14, npm install @pdftron/pdfnet-node, show error:
Error: response status 403 Forbidden on https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.1.0-node-v72-linux-arm64.tar.gz
Please describe your issue and provide steps to reproduce it:
npm install @pdftron/pdfnet-node
Currently, we do not yet have the SDK available for Linux arm64. Please note that you can still use can use x86 or x86_64 architectures for PDFTron SDK in Linux.
Is there any workaround or scheduled release for this? The M1 chip has been out for over a year, and including @pdftron/pdfnet-node in a docker build breaks the installation.
npm i @pdftron/pdfnet-node works fine on Mac natively, but a docker build, which uses the same kernel, fails.
For those Googling this, there’s currently a 302 redirect from
Same result: 403 error.
I tried installing other versions of node and Linux via Docker, no luck.
What’s actually happening here? Why is there an attempt to install
pdfnet-addon-v9.1.0-node-v93-linux-arm64.tar.gz when installing on Linux but not on Mac OS directly? Is there something that can be done when installing via
npm to get around this?
Installing on macOS directly npm fetches https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.1.0-node-v93-darwin-arm64.tar.gz which is why it works on mac.
I’m hitting the same issue as you are, I’m unable to use the @pdftron/pdfnet-node npm package with docker on an M1 mac. One workaround is to use a linux/amd64 image with
--platform linux/amd64. This uses rosetta under the hood and can be very flaky. Here’s a one-liner example:
docker run -it --rm --platform linux/amd64 -w /root node:16 npm install @pdftron/pdfnet-node.
Seeing this very issue when attempting to build using
--platform linux/amd64 on our Mac M1 machines with the
pdfnetpython3 dependency in a Python project. The Docker build itself takes almost 10x time to build and is painfully slow to work if the build succeeds. Removing the
pdfnetpython3 dependency allows us to remove the
AMD64 requirement and the Docker builds do not run into the same issues.
As it stands now PDFTron is the only dependency that is forcing us to use the
@shakthi124 Is there a plan to release an AMD64 Linux build? Apple is no longer selling new Macbooks with an Intel chip.
Using docker compose and adding
platform: linux/amd64 in the docker-compose yml file got things working again on a Mac with the M1 chip. In the yml file:
container_name: <container name>
I needed to install Rosetta 2 manually:
(or auto-accepting the license agreement)
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
This may also require an XCode update, but you’ll be prompted as needed.
The build doesn’t seem to be taking too much longer (though it does take a bit longer), and the app runs marginally slower on the amd64-based container than using arm64 directly (without the pdftron dependency). I wonder if running under docker compose, or possibly reinstalling Rosetta 2 might speed things up?
I spoke with PDFTron support and they have no plans at this time to make an arm64-compatible build.