0

I'm trying to save a collection as PDF but i can't do it directly i've been searching ways to do it and the solution i've seen most is to transform the collection into HTML and then save it as a PDF but i don't know how to do it. In Powerapps

As I said, I have a collection of items selected from a gallery but each item is a form so it has a lot of fields so i have to transform that collection into HTML because i can't save the collection directly as a PDF. I have this formula which allows me to save an item from a gallery into PDF i need to change the contentBytes part in a way that allow me to save the collection into PDF: orAll(SelectedKontrolleItems;GuardarPDF.Run({file:{name:Concatenate(ThisRecord.ID;"_";ThisRecord.Nombre;".pdf");contentBytes:PDF(Container1_1;{ExpandContainers: true ;Size:PaperSize.A4})}}) )

eperez
  • 1

1 Answers1

0

You will need to have an HTML Text control in the container referenced in the Content Bytes field.

To generate the HTML text, you will have to use the Concat() function.

Let's say you have this collection

Name Hyperlink Opinion
Google www.google.com cool
Bing www.bing.com OK

Your formula would look like this:

Concat(colSearchEngines,"<span>using <a href='" & Hyperlink & "'>" & Name & "</a> is " & Opinion & "</span>","<br>") 

This would give you an HTML text with clickable links like 'using Google is cool' on separate lines.

The HTML control must remain inside the container, the PDF() function does not accept it directly.

Your ForAll() formula seems to be correct to me.

mmikesy90
  • 783
  • 1
  • 4
  • 11