1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Allow e.g. /FitH destinations without additional parameter (bug 1907000)

According to the PDF specification these destinations should have a coordinate parameter, which may however be `null`, but it shouldn't be omitted; please see https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2095870

Hence we try to work-around bad PDF generators by making the coordinate parameter optional when validating explicit destinations in both the worker and the viewer.
This commit is contained in:
Jonas Jenwald 2024-07-11 09:30:42 +02:00
parent cf58113e8c
commit 403d023617
5 changed files with 248 additions and 2 deletions

View file

@ -78,7 +78,7 @@ function isValidExplicitDest(dest) {
case "FitBH":
case "FitV":
case "FitBV":
if (args.length !== 1) {
if (args.length > 1) {
return false;
}
break;