Select to view content in your preferred language

Images get cut off when printing report.

1452
8
02-15-2022 05:59 AM
GISManager4
Regular Contributor

When a user goes to print a report to pdf, the photos get cut off on some pages (see attached.) I have the image size set to small and 1280 pixels. What settings can I change to prevent this?

0 Kudos
8 Replies
Katie_Clark
MVP Regular Contributor

I don't see any attachment with your post...

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
GISManager4
Regular Contributor

I edited the post and added the attachment.

0 Kudos
DerrickWestoby
Frequent Contributor

You need to restrict the size of the photos in the feature report template itself. 

You probably have something like ${image} in your feature report, but need to restrict the size with something like ${image | size:0:0:660:500}

See attached for the photo template that I always use in my reports.  

 

https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm

Images and other attachments

For image questions, sizes can be set to ensure that your reports have images of consistent size. The format for these expressions is as follows:

${image1 | size:width:height:max_width:max_height}

The width and height values control the set size of your image, measured in pixels. While these values are required for the expression, providing a value of 0 will place no restriction on that dimension of your image. For example, the following expression forces the width of your image to be 300 pixels while preserving the aspect ratio of the image:

${image1 | size:300:0}

The maximum height and width values limit the maximum size of an image and are optional values. The following example forces the width of the image to be 300 pixels and restricts the image height to no more than 200 pixels:

${image1 | size:300:0:0:200}

Image questions can also have image details extracted and displayed in a survey response. This can be used to display the file name and size of the image as follows:

${image1 | getValue:"name"}

${image1 | getValue:"size"}

${image1 | getValue:"width"}

${image1 | getValue:"height"}

The same method can be used to display EXIF data from the image, showing details of where and when a photo was taken, as follows:

${image1 | getValue:"x"}

${image1 | getValue:"y"}

${image1 | getValue:"date"}

${image1 | getValue:"time"}

${image1 | getValue:"direction"}

To display the original image at its full size and quality, use the expression without any method, or use the getValue expression without any value:

${image1} or ${image1 | getValue:""}

To display the original image at full quality but a set size, use the getValue and size expressions together.

${image1 | getValue:"" | size:300:0}

Note:

If you are setting an image's size while using any other expression parameter, size must be placed last in the expression.

Dates and times are stored as strings in EXIF data, so these values cannot be formatted in a report using the format expression for date and time questions. If formatting these values is important, consider performing the EXIF extraction as part of your survey using the pulldata() function. For more information, see Images.

0 Kudos
DerrickWestoby
Frequent Contributor

I already made a longer post, but it disappeared?  

Change ${image} (or whatever) in your feature report template to something like ${image | size:0:0:660:500}

0 Kudos
GISManager4
Regular Contributor

I am using Esri's default report.

0 Kudos
DerrickWestoby
Frequent Contributor

The default report doesn't include the parameter to restrict the size of the images.  You can download the report template from the Survey123 website and add the parameters I posted to your image question, then re-upload it and generate your report. 

0 Kudos
GISManager4
Regular Contributor

Don't Custom Reports use credits?

0 Kudos
DerrickWestoby
Frequent Contributor

I was under the impression that all reports use credits, even if you're using the default/auto generated template. I've never actually looked into that, but I don't imagine that ESRI would charge for custom report templates but not the default one.  

The "Preview sample report" option does not use credits though. 

DerrickWestoby_0-1645040866301.png

 

0 Kudos