How to send image data or retrieve images from a file or URL? (2024)

Dynamically inserting an image in to a document requires two things:

  • The template controlswherethe image will appear
  • The datadetermineswhatimage is used

This article explains how to structure the data.

The Template

Please refer to this article to learnhow to use aplaceholder image in the templateto control where the imageappears in the final document.

The three options below assume the templatewill be using thedata item "logoImage".

How to send image data or retrieve images from a file or URL? (1)

The Data

The image that will appear in the finished document is determined by the data.

When calling the REST API of Cloud or Tornado, there are three different ways to provide image data.

Send the image in the data as a BASE64 encoded binary representation

In JSON format, the data would look like this:

"logoImage":"image:base64:iVBORw0KGgoAAAA... "

Note that the data must have"image:base64:"appended before the BASE64 data string.

Use an image file name, also called stock images

This approach is useful where the same image (eg: a signature or alogo) will be used multiple times, possibly in many different documents.

The image must be provided to Docmosis before the document generation occurs and the data contains a reference to that image.

CLOUD: The images should be loaded to the Images area either via the Cloud Console or using the API. If youuse folders to organise your images, the path should include those folders.

TORNADO: The images should be stored in the same folder used for the templates. You may choose to create a top level folder (for example: "Images") to help separate the images from your templates, in which case your would use:"[userImage:Images/...]"

In JSON format, the data should look like this:

"logoImage":"[userImage:customers/Meta-Logo-Long.png]"

Note the values are surrounded by square "[ ]" brackets. Thetext "userImage:" precedes the filename. The filename can also include a path to the image.

The URL of the image

In this case the image to be inserted will be provided by a URL. This approach may beuseful where the image is dynamically generatedor is specific toeach document.

"logoImage":"[imageUrl:http://metalegalfinance.com/resources/Meta-Logo-Long.png]"

Note the values are surrounded by square "[ ]" brackets. Thetext "imageUrl:" precedes the URL path.

The URL needs to be whitelisted, before it can be used.

CLOUD: To whitelist a URL please contact support to organize this.

TORNADO: To whitelist a URL you need to apply a Custom Setting on the Configurationpage of the Tornado Console. The setting is: "docmosis.external.resources.whitelist=https://example.com;http://another.com"(without the quotes). To whitelist multiple domains, seperate each URL with a semi-colon. Enter the URL in the Custom Setting textbox, then hit the Save button and then hit Restart (on the Status page).

Please refer to the Web Services Guide for further details on how to format/structure your image data.

How to send image data or retrieve images from a file or URL? (2024)
Top Articles
Refund Of TCS On International Remittance - The What & How! - moneyHOP is a full-stack cross-border remittance player which enables education related remittance for India students, conveniently and economically across the globe.
Aktualności - Nauka - Uniwersytet Jagielloński
Funny Roblox Id Codes 2023
Matgyn
It's Official: Sabrina Carpenter's Bangs Are Taking Over TikTok
Obor Guide Osrs
Body Rubs Austin Texas
DENVER Überwachungskamera IOC-221, IP, WLAN, außen | 580950
Nm Remote Access
Newgate Honda
Morocco Forum Tripadvisor
Bestellung Ahrefs
Oro probablemente a duna Playa e nomber Oranjestad un 200 aña pasa, pero Playa su historia ta bay hopi mas aña atras
Rainfall Map Oklahoma
Craigslist Free Stuff Greensboro Nc
Puretalkusa.com/Amac
Craigslist Red Wing Mn
Aspen Mobile Login Help
H12 Weidian
Curry Ford Accident Today
Theater X Orange Heights Florida
Gazette Obituary Colorado Springs
11 Ways to Sell a Car on Craigslist - wikiHow
Reviews over Supersaver - Opiness - Spreekt uit ervaring
Horn Rank
Leben in Japan – das muss man wissen - Lernen Sie Sprachen online bei italki
Movies - EPIC Theatres
Login.castlebranch.com
Www.1Tamilmv.con
Little Einsteins Transcript
Tenant Vs. Occupant: Is There Really A Difference Between Them?
Crystal Mcbooty
Are you ready for some football? Zag Alum Justin Lange Forges Career in NFL
Babylon 2022 Showtimes Near Cinemark Downey And Xd
The Thing About ‘Dateline’
Express Employment Sign In
Flipper Zero Delivery Time
Seminary.churchofjesuschrist.org
Kb Home The Overlook At Medio Creek
Powerboat P1 Unveils 2024 P1 Offshore And Class 1 Race Calendar
Shell Gas Stations Prices
Dickdrainersx Jessica Marie
Patricia And Aaron Toro
Avatar: The Way Of Water Showtimes Near Jasper 8 Theatres
Senior Houses For Sale Near Me
Stitch And Angel Tattoo Black And White
Muni Metro Schedule
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Gear Bicycle Sales Butler Pa
Publix Store 840
Ingersoll Greenwood Funeral Home Obituaries
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 5457

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.