我正在动态构建 PDF 图形图像,它使用一些标准 PDF 混合模式,例如“屏幕”。
但是,当我在 Illustrator 或 Acrobat 中打开文件时,它们看起来很相似,但与在浏览器(FF 或 Edge 或 Chrome)中查看相同的文件有很大不同。我知道不同的浏览器可能会以不同的方式处理它,但我希望在所有浏览器以及 PDF 阅读器和 Illustrator 中实现相同的结果(这应该是 PDF 的目的)。
以下是PDF内容:
% General blending for the page:
15 0 obj
<< /Type /ExtGState
/BM /Screen
>>
endobj
% My Pattern Graphics State:
16 0 obj
<< /Type /ExtGState
/CA 0.500
/ca 0.500
>>
endobj
% My pattern consists of 3 red circles, color set with CMYK mode
17 0 obj
<< /Type /Pattern
/Length 744
/PatternType 1
/TilingType 1
/XStep 141.73228346456693
/YStep 141.73228346456693
/BBox [0 0 200 200]
/PaintType 1
/Resources <<
/ExtGState <<
/G3n7jpt02prtn 16 0 R
>>
>>
>>
stream
/G3n7jpt02prtn gs
0.000 1.000 1.000 0.000 k
120 80 m 119.768 96.473 108.284 108.284 y 96.473 119.768 80 120 y 63.527 119.768 51.716 108.284 y 40.232 96.473 40 80 y 40.232 63.527 51.716 51.716 y 63.527 40.232 80 40 y 96.473 40.232 108.284 51.716 y 119.768 63.527 120 80 y f
100 120 m 99.768 136.473 88.284 148.284 y 76.473 159.768 60 160 y 43.527 159.768 31.716 148.284 y 20.232 136.473 20 120 y 20.232 103.527 31.716 91.716 y 43.527 80.232 60 80 y 76.473 80.232 88.284 91.716 y 99.768 103.527 100 120 y f
140 120 m 139.768 136.473 128.284 148.284 y 116.473 159.768 100 160 y 83.527 159.768 71.716 148.284 y 60.232 136.473 60 120 y 60.232 103.527 71.716 91.716 y 83.527 80.232 100 80 y 116.473 80.232 128.284 91.716 y 139.768 103.527 140 120 y f
endstream
endobj
% The page content, which fills the page with the above pattern and shows on top 3 more green circles with the screen blending:
18 0 obj
<</Type /Page
/Parent 1 0 R
/Resources 2 0 R
/Contents 19 0 R>>
endobj
19 0 obj
<</Length 832>>
stream
2.835 0 0 2.835 0 0 cm
/Pattern cs
/Ps0gpdo03xmd2 scn
0 0 m 400 0 l 400 400 l 0 400 l f
/Gme179iqab6jw gs
1.000 0.000 1.000 0.498 k
120 80 m 119.768 96.473 108.284 108.284 y 96.473 119.768 80 120 y 63.527 119.768 51.716 108.284 y 40.232 96.473 40 80 y 40.232 63.527 51.716 51.716 y 63.527 40.232 80 40 y 96.473 40.232 108.284 51.716 y 119.768 63.527 120 80 y f
100 120 m 99.768 136.473 88.284 148.284 y 76.473 159.768 60 160 y 43.527 159.768 31.716 148.284 y 20.232 136.473 20 120 y 20.232 103.527 31.716 91.716 y 43.527 80.232 60 80 y 76.473 80.232 88.284 91.716 y 99.768 103.527 100 120 y f
140 120 m 139.768 136.473 128.284 148.284 y 116.473 159.768 100 160 y 83.527 159.768 71.716 148.284 y 60.232 136.473 60 120 y 60.232 103.527 71.716 91.716 y 83.527 80.232 100 80 y 116.473 80.232 128.284 91.716 y 139.768 103.527 140 120 y f
endstream
endobj
% General resources for all document:
2 0 obj
<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/Font << /F1 3 0 R >>
/ExtGState <<
/Gme179iqab6jw 15 0 R
>>
/Pattern <<
/Ps0gpdo03xmd2 17 0 R
>>
>>
endobj
% General document settings:
1 0 obj
<</Type /Pages
/Kids [
18 0 R
]
/Count 1
/MediaBox [0 0 1133.86 1133.86] % = 400x400 mm
>>
endobj
% Root:
21 0 obj
<<
/Type /Catalog
/Pages 1 0 R
/OpenAction [3 0 R /FitH null]
/PageLayout /OneColumn
>>
endobj
这是期望的结果(在 Illustrator 和 Adobe PDF 阅读器中):
但这就是 FF/Edge 中的样子:
这就是它在 Chrome 中的样子:
我的 PDF 中是否缺少某些定义?
注意:我使用的是 PDF-1.6 规范。
PDF 文件本身的链接: 测试 PDF 文件
编辑: 我尝试添加一个透明组,但似乎我仍然缺少一些东西,因为它没有任何区别。测试 PDF 文件 2 非常感谢