What do I need to do to make this transparency work

眉间皱痕 提交于 2019-12-05 18:38:52
mkl

Acrobat pro renders the transparent portion solid. If I view it in chrome it looks right.

Just like in the case of the question Transparent images in PDF the problem indeed is the knockout setting in a transparency group. Knockout settings seem to be ignored by some viewers, especially by the built-in Chrome PDF previewer, but correctly are respected by (current) Adobe Acrobat and Reader versions.

In contrast to the situation in that other question the group in question is not the page group but a group of a specific xobject. As that xobject contains both the transparent image and the image the OP wants to shine through, though, the observed issue is very similar.

how can I change this in Acrobat?

I found no obvious way to edit transparency group settings in Acrobat. But I unfortunately only have version 9.5 here, maybe newer versions allow that.

I also seem be able to, in Acrobat, cut the image, then paste it back in and I get the transparency I need. What is this changing

Most likely this cuts the image out of the knockout transparency group shared by the images (the actual photo and the partially transparent pure black image you want to use for darkening), and pasting it back in results in those two images residing in different transparency groups; thus, they cannot knock each other out anymore.

how can I change this without having to cut, paste and re-position

You can easily patch the PDF, thereby removing the K knockout entry from the transparency group definition, see below.

PDF structure

The page 1 content of the PDF provided by the OP contains quite an object hierarchy:

  • The immediate page content is not part of a transparency group and contains one image xobject Im0 and two form xobjects Fm1 and Fm2.
  • The form xobject Fm1 has a knockout transparency Group entry and contains one form xobject HiQPdf_fnebajfcjaojkndmodkafcbjdllengkl
  • The form xobject HiQPdf_fnebajfcjaojkndmodkafcbjdllengkl does not have an own Group entry but is part of its parent's knockout transparency group; it contains two image xobjects HiQPdf_fhhbjncnhiipkdhfommnfnbdgijfcjpi and HiQPdf_ibbjecddhjhkknkjbhmbefkgfbbmakep, the latter one covering the top part of the former.
  • The image xobject HiQPdf_fhhbjncnhiipkdhfommnfnbdgijfcjpi contains a photo of some house, no transparency.
  • The image xobject HiQPdf_ibbjecddhjhkknkjbhmbefkgfbbmakep is black and has a transparency SMask with a value 162 everywhere.

The somewhat transparent image HiQPdf_ibbjecddhjhkknkjbhmbefkgfbbmakep and the image HiQPdf_fhhbjncnhiipkdhfommnfnbdgijfcjpi covered by it both are in the same knockout transparency group provided by Fm1. Thus, the transparency does not allow the house in HiQPdf_fhhbjncnhiipkdhfommnfnbdgijfcjpi shine through but what is behind Fm1.

But there is nothing behind Fm1 which in PDF implies a white background. Combined with the blackness of HiQPdf_ibbjecddhjhkknkjbhmbefkgfbbmakep and a constant SMask value 162 this results in the gray bar you see in Adobe Reader:

Removing Knockout

The knockout transparency group dictionary of Fm1 is in object 31 0:

31 0 obj
<</K true/S/Transparency>>
endobj 

By overwriting /K true with spaces the PDF is patched to have a non-knockout group here, and the result is:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!