[New in PowerApps] The new PDF() function is a gamechanger
Вставка
- Опубліковано 23 лип 2024
- Explaining the ins and out of the new experimental PowerApps PDF()-function.
- enable the new function
- calculate the right page size
- create multiple page PDFs
- mail or save the PDF
Get the demo app from my github github.com/PowerRobin/LernPow...
Get the demo app from the pnp repo github.com/pnp/powerapps-samp...
Hiros blog post about the function mofumofupower.hatenablog.com/...
My svg playlist • [Fun with SVGs] EP6: C...
Other english PowerApps videos • Recreate a design in P...
0:00 Intro
1:00 Agenda
1:36 Enable the experimental PDF-function
2:15 PDF() function and parameters
6:26 Calculating the right size
11:03 Decrease DPI to fit your screen
12:18 Generate an invoice with a signature
14:39 Generating multiple page PDFs with galleries
18:18 Create multi page layouts with a vertical container
21:45 Send your PDF as Email attachment
24:41 Upload PDF to OneDrive via Power Automate
27:59 summary
music from musicfox.com
Wow, thank you so much, just what I needed, greetings from Colombia ✌🏼
Glad I could help!
YES YES YES! AMAZING FINALLY I HAVE A WAY TO PRINT MULTIPLE PAGES FROM POWERAPPS!!! AMAZING!!
You rock! great tutorial :)
Thank you so much!
Exactly, what I needed !
EVERYONE asks for PDFs all the time and it seems like Microsoft finally listened 😅😅
master of masters.. thank you
Thank YOU for that comment!
Lifesaver, thank you!
Thanks!
Liebe deine Tutorial. Weiter so.
Danke dir, ich versuche es!
Thank you Robin for this Video! The PDF Function makes it now so much easier, Powerplattform is really improving :-)
Any timeline when you will post your first Videos about your great Component libary?
Thank you for all of your great work!
I think we have a spot to present this at the 22nd of December on the pnp-call.
So expect it to be released before christmas (still not 100% done 😅)
@@R2Power Thank you Robin! Really looking forward to seeing your result. 😊
echt stark Robin!
Danke Peter!
Bold texts inside of HTML blocks seem to work fine. :)
Nice!
Guess they reworked some parts
Great information! This helps a lot! Is it possible to set up a container so that when you use the PDF function against it while the App is being used on a mobile device, that the container still fills the resultant PDF file? Thanks!
Should work with a container, that is larger than the screen, but I didn't try it myself
Great work! Thanks for taking the time to make this video. Is there a way to directly download the file instead of emailing it? Thanks
You can save it somewhere on SharePoint, pass the link back to PowerApps and directly use the Launch()-function to call the link
Super Video, Robin! Viele Dank fürs Teilen.
Hast du bei Galleries die über mehrere Seiten auch den Effekt, dass sich der untere Teil einer Zelle mit jeder Seite weiter nach unten verschiebt und sozusagen auf der nächsten Seite oben kommt?
Hab auch mal die Gallery in einen Container gepackt, aber das ändert nichts.
sorry, habe noch nicht in das speziell Thema reingeschaut.
Idee wäre vielleicht eine verschachtelte Galerie und dann immer x Elemente pro Seite.
Damit könnte man dann auch wiederkehrende Header etc. umsetzen
@@R2Power Nee, nested Galleries werden nicht unterstützt :(
Ich versuche gerade so eine Art Projektübersicht zu bauen, in dem in der Gallery einige Daten und ein Bild gezeigt werden soll.
Das Deckblatt in einem Container und eine Legende im 2. Container klappt super. Nur bei der Gallery im 3. Container verschieben sich die Pixel.
Thank you for this Robin, I can see this function getting a lot of use, I've had a play around and it seems you can use a negative margin, it may help if you are trying to pixel perfect a page. Anyway it is so much better than the converted html in onedrive technique. I have a gantt style chart made from 2 overlapping pixel perfect galleries, and I tried to recreate it in html, but the html in the onedrive conversion is pretty limited so I could only create a basic looking chart. Now the chart looks really professional in the pdf page.
I did a few tests with the bold problem and I couldn't get it to work either. I tried using labels and tried html text, using also tried creating a with no luck. The same happens with italic or tags, and also underlined, all is stripped from the text. Hopefully an update with fix this.
The documentation states it doesn't work with galleries inside galleries, but I did find that using the creators kit details list component within a blank variable height gallery worked with tabular data. Passing a table grouped using groupby to the gallery, and accessing the grouped column in the details list printed out in the pdf ok.
Thanks for your video on this, it's been very helpful!
Yeah, figuring out what works in the OneDrive html->pdf is exhausting and pretty limited in the end...
Also tried all possible ways to get a bold text in the PDF and didn't succeed :(
@@R2Power one thing that works for me is to use heavier font (i.e. Lato Black) for bold text and a lighter font (i.e. Lato Light) for normal paragraph. That results in a better representation in the PDF 🙂
@@moomoo7946 thanks for the Idea.
That should work perfectly.
Salamat.
walang anuman
This video is great! got a question: how can the container be sized beyond the limits of the screen? I can't stretch the container outside the screen limits.
Type in values into the X/Y/Width/Height-properties
But strange things can happen when you do that (screen jumps to that control when you focus it)
In my case if I forced the block inside of the container to autosize to the content (HTML text) the container automatically would resize beyond the screen to fit the HTML block. You can also use some other container-type control that is scrollable, like a gallery.
@@R2Power I tried didn't work. Had resize the screen itself. Thanks!
You are amazing dear
(Hide controls ) is this will hide the pdf button only or all the controls in the screen?
every control where you set the "Visible" property to the variable you set to "false" (and afterwards to "true" again)
Thanks for this very informative video. I was able to successfully use your code and trigger an email, but somehow the email is missing attachment. Any help would be highly appreciated. Thanks.
did you actually define the attachment for the email properly?
Check the code I show at 22:15
Nice video!! If your Invoice page (page 1) had many items so one page is not enough?
hi I have question during edit mode of canvas application i can download 6 pages of pdf but when we publish the code and from publish app we get on one page in pdf ?
i had tried many approaches as well yours's too since i didn't get any alternate solution
Sorry, don't understand the question
It was a really great Video, just I want to ask one doubt i.e., in the part for creating file in One drive, I'm getting an error in the Power Automate running part which is "Missing column. Your formula is missing a column 'contentBytes' with a type of 'Blob'"
Kindly help me out I have used same formula which is shown at 27:42 in the video.
file property for the flow needs to look like this:
file:{name: "randomstring", contentBytes: varPDF}
but it's exactly as shown in your timestamp
Question, can '2 certificate sign fields' be added to the pdf?
Sorry, don't exactly know what you mean by that
Hi Robin,
vielen Dank erst mal für deinen Content. Immer eine große Hilfe. Die Einfache PDF Seite funktioniert soweit fehlerfrei in meiner App. Denkst du das mögliche Szenario: Wenn ich mehrere dynamische Positionen habe, die ich immer auflisten will wenn etwas hinzugefügt wird, dass sich die Seiten automatisch anpassen können?
Also folgender Use Case:
Wenn Inhalt eingetippt in Bemerkungsfeld/ also Feld genutzt
--> Dann PDF verlängern.
Glaubst du das ist irgendwie realisierbar oder ist das realitätsfern?
-Wenn nicht dann Inhalt bis zum eingetippten am besten schrumpfen
Vielen Dank schon mal.
Liebe Grüße
Mit einem vertikalen Container verschieben sich automatisch die Inhalte.
Also einfach alles untereinander und den entsprechenden Abschnitt auf Visible (oder nicht) setzen.
Das drunter verschiebt sich dann automatisch hoch/runter.
@@R2Power Super Danke dir! Werde ich mal testen :D
Hallo Robin, ich möchte gerne Objekte wie z.B. PenInput per Button_Click ein- bzw. ausblenden lassen, leider komme ich auf keine Lösung. Kannst Du mir evtl. einen Tipp geben? VG Siegmund
Hi Siegmund, ich habe dazu schon ein Video gemacht. Hoffe das hilft:
ua-cam.com/video/bcIM8MrRf2o/v-deo.html
I can't get the "ExpandContainers: true" parameter working correctly. It does expand the size of the document to the size of the data, but anything that doesn't fit the screen is just blank. So I end up with 4 empty pages and half of the 1st page filled with the data visible on the screen... What am I doing wrong?
Oh, I fixed it. Turns out the AutoHeight parameter in my HTML block that I put into a container was set to "false" so its size conformed to the size of the parent container. By changing it to "true" the multi-page PDF displays quite well (sometimes cuts the text in the middle of the line, but it's ok I guess...)
Perfect, thanks for sharing!
how do you get your workspace to be so big? my apps are only 768px height, am I missing anything? 🤔
Setting -> Display -> Size -> Custom
When I add Expand containers its showing an error the option Expandcontainers is not recognized
sorry, don't know, "ExpandContainers" still works for me as shown in the video (probably the capital C)
While we click Button PDF function in first screen, PDF is created in second screen to send the email with Attachment. (not to go navigation second screen) ?
how did you hide controls?... (Set;varPrintmode;true) and (Set;varPrintmode;false) and then using in the "Visible" property of the controls '!varPrintmode" is not working .... did i miss something?
This should work:
Set(varPrintmode; true);;
PDF(parameters);;
Set(varPrintmode; false);;
Nice video but don't seem to get why my PDF is not being created. I followed the formula and I have no errors but when I click on the create button, it stalls as if the PDF is being created and then nothing happens.
Sorry, hard to say anything without seeing the error.
Always keep in mind that it's still experimental!
Hi Robin - ich versuche einen PenInput als Image direkt im Container zu verwenden. Angezeigt wird der input dann in einer Image Control richtig, aber am PDF ist er nicht drauf :(
Leider immer noch experimentell die Funktion, da funktioniert wohl noch nicht alles
danke bro
Gerne Marv
Dear I used to have an old version of my apps
it was working perfectly so I didn't touch the formula or anything ,,, it expand the gallery perfectly without any errors put so on so far ,,, I think when I update the apps for different modifications not related to this pdf function, the capability is gone ,,,, the last publishing was one year from now ,,, when I update this august the capability gone .... something related to platform update happens by MS them self
This is still an experimental function, so I wouldn't use this in production apps
@@R2Power i think MS stop this function for business wise
how to add signature (by photo) on pdf file
I think you need to get the base64 value of the pic.
You can use the JSON() trick to get it from an image control
Hello, I'm from Brazil and I follow your channel. You could create a video on: How to generate all gallery items in PDF, but that gallery item would take up 1 full page of the PDF. Example: 1st page PDF gallery item 1 Gallery item 2, PDF page 2, and so on. Items can be images.
This exact scenario is covered in this video...
Hallo Robin, Ich möchte unsere Werkzeugliste digitalisieren. Es sind ca. 20st. Werkzeuge welche ich in Sharepoint erfasst habe und in PowerApp in Gallery anzeige. In der Gallery sehe ich das Bild von dem jeweiligem Werkzeug, Die Artikelnummer, Bezeichnung, Menge und und Auswahl: Vorhanden oder Nicht vorhanden.. Die Idee ist, dass wenn wir ein neue Mitarbeiter erhalten, dass der Teamleiter mit dem Powerapp die Liste durch geht und an gibt ob die Werkzeuge vorhanden sind oder nicht. Wenn er das gemacht hat. Soll man wie du hier im Video gezeigt hast in PDF angezeigt werden. Das Blatt muss auch von beiden Parteien unterschrieben werden, in diesem Video hast du es auch verwendet finde ich cool. Dann sollte das PDF per Email weiter gesendet werden. Es wäre sehr schön wenn du ein Video darüber machen könntest. Gruss Ersin
Das ist ja alles in der Demo App drin.
Einfach runterladen und durchstarten!
@@R2Power Hallo Robin, wie kann ich programmieren das zwei Leute Unterschreiben können? Gruss Ersin
@@ersinyalcin7671 sorry, den transfer musst du hinkriegen. Das lässt sich nicht in einem UA-cam Kommentar beantworten
The next big hurdle is PDFing flexible height galleries 😕
Already posted how to calculate the total height of a flexible height gallery on twitter once.
That should also work here. I'll give it a try and probably do a short video.
Alternatively you could try html-tables.
Kommt es noch auf deutsch?
Dieses Video eher nicht
@@R2Power Schade, trotzdem sehr hilfreich.
It’s an experimental feature so be cautious
absolutely right, think I also said this in the video