fix(pdf): change pantone fallback function to type 2 for better viewer compatibility
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 15s
Build & Deploy / 🧪 QA (push) Successful in 1m50s
Build & Deploy / 🏗️ Build (push) Successful in 2m51s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m24s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-06-12 15:44:54 +02:00
parent 41228aca53
commit b826b5b741
13 changed files with 7 additions and 8 deletions

View File

@@ -18,14 +18,13 @@ async function run() {
// CMYK tint transform for PANTONE 289 C.
// Approximation: 100C, 64M, 0Y, 60K (1.0 0.64 0.0 0.60)
// The function maps an input x (0 to 1) to CMYK: x*1.0, x*0.64, x*0.0, x*0.60
const tintTransform = pdfDoc.context.stream(
'{ dup 1.0 mul exch dup 0.64 mul exch dup 0.0 mul exch 0.60 mul }',
{
FunctionType: 4,
Domain: [0, 1],
Range: [0, 1, 0, 1, 0, 1, 0, 1],
},
);
const tintTransform = pdfDoc.context.obj({
FunctionType: 2,
Domain: [0, 1],
C0: [0, 0, 0, 0],
C1: [1.0, 0.64, 0.0, 0.6],
N: 1,
});
// Create the /Separation color space array
const pantoneCS = pdfDoc.context.obj([