We've all battled empty images by using a workaround with an empty PNG, empty EPS, and/or an extra Visibility ADOR to hide the layer with the variable image..In the past, we used a solution like this to avoid printing the gray box for empty images in InDesign.if (IsNullOrEmpty(|->[photo])){ "empty.png" }else{ |->[photo] }The good and the bad of the PNG approach is that the png file contains transparency which slows processing time and can cause PDF stitching (seams in the colors). I spent the better part of yesterday fighting stitching with Sharon Wall of Compassion International before arriving at the solution below.For many years, I've used an Illustrator EPS file with no line and no fill as a placeholder image. Then I'd have to hide the layer because a white box would show in the PDF output. This method also carried unnecessary overhead with extra Visibility ADORs.
Make a PDF by exporting an InDesign file only containing an image box with "no fill" and "no stroke". Exported from InDesign as PDFX/1-a without color conversion/profiles to reduce file size. The PDF file is only 4K, so the file is tiny. Since the file is so small it can even be used in floating text boxes and in Table ADORs without much overhead.The empty.PDF file that I made/tested is attached to this message for your use.Here's the updated logic which is similar to the previous solutions which Steve Couch provided a few times over the years. (with one small change for the file extension)if (IsNullOrEmpty(|->[photo])){ "empty.pdf" }else{ |->[photo] }
I tested the solution with the following versions of XMPie with success:
I tested multiple output languages:
I also tested the following Graphic Fitting: