cancel
Showing results for 
Search instead for 
Did you mean: 

Doc composition: Add a related image?

Fabien_Doliveux
Star Contributor
Star Contributor

Hello, I am trying to create a solution to generate a PDF file from a form and an image.

The purpose of this form is to create badges.

With Doc composition, I saw that I could add the values ​​of keywords in a template.

I also need to add the photo into the PDF. This photo is a document also store in OnBase.

The process is:

  • Someone filled out the form and upload his photo
  • The workflow is used for approval 
  • Workflow (with doc comp?) Generates a PDF with information from the employee and his photo in a template tag. 
  • The badge is printed

Is it possible to do this with composition doc please?

3 REPLIES 3

Jordan_Polaniec
Champ in-the-making
Champ in-the-making

Hello Fabien,

There are a few different ways to accomplish what you need to do. 

 If you place the image into a Document Composition Fragment, you can then retrieve it and place it onto the Template that is created.  If you decide to place multiple Fragments (images in this case) onto a separate template you can select and place a specific Fragment onto the Template based upon a Condition set on a Metadata placeholder (Perhaps a Keyword containing the name of the person who filled out the form if it exists on the form?)

Another option is to place the image into an external database and then retrieve it from there using an External Data Source placeholder with an odbc input.  This will require a table to be created in your desired database that supports Blobs for storing images.  Feel free to contact your first line of support for more details on setting this up.

The last option is to use XPath to place an image onto your document.  This option can be selected via the External Data Source | XPath configuration option and then selecting the "Insert the results as an image" Output Style option.  Feel free to contact your first line of support for an explanation on setting this up.

If this doesn't answer your question, please let me know.

Thank you,

Jordan Polaniec

Quality Assurance Associate

Hyland Software, Inc.

Hi Jordan,

Thank you very much for your answer!

I will perform research on this 3 solutions

Thanks again

Not applicable

The best method of accomplishing this requirement is to use a Unity Script, retrieve the related image(s) as bytes streams, convert the byte stream to base 64 encoded strings, then wrap the base64 string in XML. Send the XML to document composition via the Doc Comp API. You need to have a placeholder that will read the xml as an image.