Solution for setting empty variable image (blank image, null image, gray box)

92 views
Skip to first unread message

eko...@gmail.com

unread,
Aug 29, 2019, 2:52:17 PM8/29/19
to XMPie Interest Group
I had to share this great news after dealing with awkward workarounds for many years. 

History for background (and search tags):

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.

Suggested Solution:
 
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] }
 
Validation of solution:

I tested the solution with the following versions of XMPie with success:
    • CS 5.5  XMPie 5.3.2
    • CS 6  XMPie 6.5
    • InDesign 2015.14 XMPie 8.2.3 (tested all the way to the press)
    • InDesign 2018 XMPie 9.3
    • InDesign 2019 XMPie 9.4
I tested multiple output languages:
    • Postscript
    • PDF
    • PDF/VT
    • Legacy PDF
    • JPG
I also tested the following Graphic Fitting:
    • Maintain Transformation
    • Fill and Center Proportionally
    • Fit and Center Proportionally

blank images, empty images, empty.png, empty.eps, empty.txt, blank.png, noimage.png, noimage.jpg, noimage.eps, uStore, uProduce, uPlan, uCreate, gray box
empty.pdf

BrianS

unread,
Aug 29, 2019, 5:39:36 PM8/29/19
to XMPie Interest Group
Thank you very much for sharing this.

Mark

unread,
Aug 30, 2019, 8:36:29 AM8/30/19
to XMPie Interest Group
You ROCK Ed!
Reply all
Reply to author
Forward
0 new messages