The @INLINE action tag allows a PDF file or image file that is uploaded to a File Upload field to be displayed in an inline manner on the survey page or data entry form. The PDF file or image can be viewed on the page by the user or survey participant without having to download it.
This action tag works for certain image types (JPG, JPEG, GIF, PNG, TIF, BMP) and PDF files.
The @INLINE-PREVIEW action tag allows a PDF file or image file that is uploaded to a File Upload field or into a Descriptive Field to be previewed by the user or survey participant viewing the form. This action tag adds a "Preview" button that can be toggled to view the recently uploaded field without the need to download it to your device.
Tips and tricks for using the @INLINE action tag:
The PDF/image will be displayed inline on the page immediately above the download link for the field.
The PDF will be displayed with 100% width by default. This means it will fill up to 100% of the width of the space it is contained in.
Images will be displayed with their native width:height ratio. PDFs will be displayed with a 300 pixel height by default.
If you wish to manually set the width and/or height of the image/PDF, you may put the width/height values inside parentheses after the action tag in the following manner:
The width/height can be a percentage value (e.g., 50%) or a number representing size in pixels (e.g., 400). Thus @INLINE(50%) will display an image at 50% size for the area in which it is contained on the page, and @INLINE(400,100) would display the image always at 400px tall and 100px wide. To make an inline PDF appear taller on the page, you might use @INLINE(100%,600) since 300px is the default height for inline PDFs. The example will display the PDF at 600px height.
The @INLINE action tag also works if the File Upload field is embedded inside another field on the page.
Note: When adjusting the size of inline display for a file upload field, keep in mind that the display may be constrained by other design elements on the page.
Note: Inline images are not able to be displayed inside a downloaded PDF of a survey/instrument that contains data
You can also pipe an uploaded image or file inline using the ":inline" piping parameter. You may pipe an uploaded image or file into another field or into an email.
To use inline piping, append ":inline" to the name the piped file upload field, such as [my_field:inline]. If the uploaded file is a PDF file or image file (JPG, JPEG, GIF, PNG, TIF, BMP), the file will be displayed in an inline manner so that it is viewable on the page.
The ':inline' option DOES work inside emails, so you can pipe a field with ':inline' inside the email body. This allows you to display inline images inside survey invitations or Alerts & Notifications.
If you have a UW-Madison REDCap project and have questions about Inline Image and Documents, please send them to REDCap@ictr.wisc.edu