- Page Width of a document is different on Ipad when using webviewerServerURL, compared to regular browsers (Chrome on laptop, etc...).
- There is no problem (the dimensions are the same between Ipad Safari and Laptop Chrome) using only client webviewer without webviewerServerURL
Screenshots of the problem can be found here: https://www.notion.so/clovisteam/Clovis-PDFTRON-bug-af9be9cb33c24ee0a0d9218324dfda99
- Use an Apple device (Macbook Pro, Imac, etc...)
- Install XCode (last version): https://apps.apple.com/fr/app/xcode/id497799835?mt=12
- Install Docker (last version): https://docs.docker.com/get-docker/
run
npm install && npm run docker-start && npm run start
(to stop the pdftron docker container just runnpm run docker-stop
)
It will:
- build the pdftron webviewer server docker container
- run the react app on
localhost:3000
run
open -a simulator
It wil open the simulator app of XCode, then go to File > Open Simulator > [Choose a recet Ipad Pro]
After the Ipad Simulator is up, open inner Safari app and go to localhost:3000
Go to localhost:3000
inside your Chrome browser (out of the Simulator of course)
In both Safari (Simulator) and Chrome (Computer)
- Refresh the page
- Boom you will see an alert()
Result:
- On Chrome you will see a Width of
595
for page 1 - On Ipad you will see a Width of
793
for page 1 (but it displays595
the first time the document is rendered, then every time it's793
).
So the dimensions and width of a document is not consistent between devices, causing us big problems of location on documents thru pdftron.