I have designed an app that contains a Gallery (Main Gallery) that increases in number of rows based on the selection in another gallery (Selection Gallery) . When viewing the app, this means the operator can just scroll down on the main gallery to see the full contents. No problem here.
I have a button that uses the Print() function to generate a PDF of the current page showing both galleries. The main gallery sometimes has more rows than can fit on the page so I set the Main Gallery height and Screen height to extend based on how many rows are in the Main gallery using the below functions.
Screen1.Height - If(Self.Printing, ChecksGallery.TemplateHeight*CountRows(ChecksGallery.AllItems)+113, Max(App.Height, App.MinScreenHeight))
MainGallery.Height - If(Parent.Printing, Self.TemplateHeight*CountRows(ChecksGallery.AllItems),639)
When viewing in the preview section of the app it works perfectly and generates an A4 pdf with the app extended and showing all the rows on the main gallery. But when using the published version of the app it doesn't amend the screen height and so the resulting pdf just has the landscape app scaled down to fit on the portrait A4 page.
Can anyone advise on whether this is a bug or if there is functionality that could get around this feature?