I have included images that were attached to the claim by doing this:
- claim = Claim [ID == input.Claim_ID.toLong()];
- claimPhotos = List();
- if ((claim.Image_1 != null) && claim.Include_Image_1_In_Final_Report)
- {
- photoHTML = claim.Image_1.replaceFirst("/sharedBy/appLinkName/",zoho.appuri);
- photoHTML = photoHTML.replaceFirst("viewLinkName","Claim/" + input.Claim_ID);
- photoHTML = photoHTML.replaceFirst("fieldName/image","Image_1/image-download");
- claimPhotos.add(photoHTML);
- }
- ...
And then later I loop through the list and add the photoHTML to the page.
This works fine when I view it in the browser, but I can't seem to get the images to display in a pdf.
I tried to use a permalink by doing something like this:
- photoHTML = photoHTML.replaceFirst("viewLinkName","view-perma/Claim/HUEvTy8uRRWgRw.../" + input.Claim_ID);
... but that doesn't show the image at all. How can I get images to display in the PDF without making all the claim information publicly available?