Hello,
Uploads pictures to the sharepoint list as attachments. Everything saves correctly. Then I display all items from sharepoint list and all photos from attachments (as Gallery). Everything works on the screen. Then I create a PDF (using the PDF() function), and immediately upload it as an email attachment. My problem is that if I have pictures up to about 0.5MB they load correctly into PDF, if I have pictures bigger they don't load into PDF and PDF have errors. PDF file has 2 pages of content and then 100 empty. It should only have 2 pages.
Images are uploaded using a form (UploadedImage, AddMediaWithImage, attachCtrl)
Sharepoint list attachment collection code:
Collect(colAttachments;{DisplayName:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; ID:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; Id:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; Value:UploadedImage3_1.Image});;
Reset(attachCtrl1_1)
Code to generate PDF and send email:
Office365Outlook.SendEmailV2(User().Email;"PDF"; "Body email";{Attachments:Table({Name:var_tmp &"_nr_"&number&".pdf";ContentBytes:PDF(Gallery4_1;{Size:A4;ExpandContainers:true})});
How to generate a PDF so that large photos load properly Or how to reduce the size of the photo before uploading to shapepoint list