Skip to main content
Version: 10.2.4

Review PDF content

Use case: human worker needs to review the content of a PDF file and to fill some fields in a Manual Task.

Currently, IA Cloud Enterprise does not provide the functionality to review PDF files out of the box. If you still need this feature, there is a solution that can help.

  1. Create a Manual Task.

  2. Go to the Design tab and select Code Editor.

  3. Find the following part of the code:

    <div class="place">
    <@answers question=question/>
    </div>
  4. Replace it with the following code:

    <div class="place">
    <div>
    <object data="${question.data.pdf_link?replace('http://','https://')}" width="100%" height="400" type="application/pdf">
    <embed src="${question.data.pdf_link?replace('http://','https://')}" type="application/pdf" />
    </object>
    </div>
    <div>
    <@answers question=question/>
    </div>
    </div>

    The expected result (example) looks as follows.

The PDF viewer itself is the following code:

<object data="${question.data.pdf_link?replace('http://','https://')}" width="100%" height="400" type="application/pdf">
<embed src="${question.data.pdf_link?replace('http://','https://')}" type="application/pdf" />
</object>

iFrame also can be used instead of object&embed.

<iframe src="${question.data.pdf_link?replace('http://','https://')}" width="100%" height="800"></iframe>

It uses the pdf_link input field. You can also change its width and height, but remember that it only works for PDF files.