How to avoid error when url to image for adding into PDF is empty

How to avoid error when url to image for adding into PDF is empty

Sometime you may need to built a workflow where you add images into existing pdf template and input image is optional. By default, PDF.co will throw error if url to image object is empty.

Walkaround:

  1. Add the additional step to check if your source image is required or not.
  2. If image is not required or empty then set url for image object into the following value:
data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==

This represents a small transparent image.

If you use Integromat:

You may want to use built-in conditional operator functions in Integromat that allows to provide different value based on the input condition check, see the documentation here https://www.integromat.com/en/help/general-functions

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.