{"id":1456,"date":"2021-09-17T19:06:42","date_gmt":"2021-09-17T19:06:42","guid":{"rendered":"https:\/\/365stack.in\/?p=1456"},"modified":"2023-06-25T09:54:03","modified_gmt":"2023-06-25T09:54:03","slug":"powerapps-print-form-to-pdf","status":"publish","type":"post","link":"https:\/\/365stack.in\/index.php\/2021\/09\/17\/powerapps-print-form-to-pdf\/","title":{"rendered":"How to Print Scrollable Screen to PDF in PowerApps"},"content":{"rendered":"\n<p>One of the common requirements in any application is to print the data either to save the form as PDF or print the form. PowerApps provides <a href=\"https:\/\/365stack.in\/index.php\/2021\/06\/05\/print-screens-in-your-canvas-app\/\" target=\"_blank\" rel=\"noreferrer noopener\">Print() function<\/a> to print the screen in a printable format, but the limitation is the screen height cannot be greater than 2164px. <\/p>\n\n\n\n<p>If a Scrollable screen is used for displaying a very large form or gallery is used to show dynamic data where the screen height cannot be predicted, in such cases we have to rely on HTML form, with the help of Power Automate a pdf can be generated which can be used for printing.<\/p>\n\n\n\n<p>One of the limitations is some of the HTML tags and CSS styles will not work in the &#8220;Convert file&#8221; action in Onedrive. For Eg: CSS &#8220;Display&#8221; property will not work properly.<\/p>\n\n\n\n<p>On Print Button Click:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UpdateContext({locHtml:\"&lt;html&gt;&lt;!--Your HTML--&gt;&lt;\/html&gt;\"});\nUpdateContext({locHtmlurl:PrinfForm.Run(locHtml)});\nLaunch(locHtmlurl.pdfurl)<\/code><\/pre>\n\n\n\n<p>In the HTML to add the form data we have to use string concatenation like below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"323\" data-attachment-id=\"1843\" data-permalink=\"https:\/\/365stack.in\/screenshot-77-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?fit=1363%2C687&amp;ssl=1\" data-orig-size=\"1363,687\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-77\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?fit=300%2C151&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?fit=640%2C323&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?resize=640%2C323&#038;ssl=1\" alt=\"Dynamic Data\" class=\"wp-image-1843\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?resize=1024%2C516&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?resize=300%2C151&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?resize=768%2C387&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?w=1363&amp;ssl=1 1363w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-77.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">Dynamic Data<\/figcaption><\/figure>\n<\/div>\n\n\n<p>To Display the gallery or Datatable data we have to use the Concat function:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"134\" data-attachment-id=\"1844\" data-permalink=\"https:\/\/365stack.in\/screenshot-78-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?fit=1231%2C257&amp;ssl=1\" data-orig-size=\"1231,257\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-78\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?fit=300%2C63&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?fit=640%2C134&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?resize=640%2C134&#038;ssl=1\" alt=\"\" class=\"wp-image-1844\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?resize=1024%2C214&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?resize=300%2C63&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?resize=768%2C160&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-78.png?w=1231&amp;ssl=1 1231w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">To Display Gallery data<\/figcaption><\/figure>\n<\/div>\n\n\n<p>To Display gallery data<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Concat(gal.AllItems,\"&lt;tr>&lt;td>\"&amp;galLabel1.Text&amp;\"&lt;\/td>&lt;td>\"&amp;galLabel1.Text&amp;\"&lt;\/td>&lt;\/td>\")<\/code><\/pre>\n\n\n\n<p>All we are doing is recreating the form structure in HTML and passing the HTML to PowerAutomate, In PowerAutomate using One Drive connector an HTML file is created and it is converted to PDF as simple as that.<\/p>\n\n\n\n<div class=\"wp-block-jetpack-slideshow aligncenter\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"329\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1461\" data-id=\"1461\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-80-1024x527.png?resize=640%2C329&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-80.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-80.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-80.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-80.png?w=1251&amp;ssl=1 1251w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"263\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1462\" data-id=\"1462\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81-1024x420.png?resize=640%2C263&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=1536&amp;ssl=1 1536w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=1546&amp;ssl=1 1546w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-81.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n\n\n\n<p>One Drive connector alone is enough to complete the operation but the file will be created in the user account for whoever using the app and it can be shared with the whole organization.<\/p>\n\n\n\n<p>Here we are using SharePoint to store all the PDF files as it acts as a centralized repository where all users can easily find the files.<\/p>\n\n\n\n<div class=\"wp-block-jetpack-slideshow\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"261\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1463\" data-id=\"1463\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82-1024x418.png?resize=640%2C261&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=1536&amp;ssl=1 1536w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=1548&amp;ssl=1 1548w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-82.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"273\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1464\" data-id=\"1464\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83-1024x436.png?resize=640%2C273&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83.png?w=1512&amp;ssl=1 1512w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-83.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"281\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1465\" data-id=\"1465\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84-1024x450.png?resize=640%2C281&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84.png?w=1428&amp;ssl=1 1428w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-84.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"316\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1466\" data-id=\"1466\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-85-1024x506.png?resize=640%2C316&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-85.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-85.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-85.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-85.png?w=1290&amp;ssl=1 1290w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"361\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1467\" data-id=\"1467\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-86-1024x577.png?resize=640%2C361&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-86.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-86.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-86.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-86.png?w=1071&amp;ssl=1 1071w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"382\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-1468\" data-id=\"1468\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-87-1024x611.png?resize=640%2C382&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-87.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-87.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-87.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-87.png?w=1079&amp;ssl=1 1079w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n\n\n\n<p>In the above process, we are checking whether the folder is present if not a new folder will be created and if the file is already there then it will be deleted and a new file will be created.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"393\" data-attachment-id=\"1469\" data-permalink=\"https:\/\/365stack.in\/index.php\/2021\/09\/17\/powerapps-print-form-to-pdf\/screenshot-89\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?fit=989%2C607&amp;ssl=1?v=1631385507\" data-orig-size=\"989,607\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-89\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?fit=300%2C184&amp;ssl=1?v=1631385507\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?fit=640%2C393&amp;ssl=1?v=1631385507\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?resize=640%2C393&#038;ssl=1\" alt=\"\" class=\"wp-image-1469\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?w=989&amp;ssl=1 989w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/09\/Screenshot-89.png?w=768&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">Respond to PowerApps<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The temporary files created in OneDrive will be deleted and the SharePoint file path will be sent to PowerApps if One Drive is used then its URL should be passed as Output.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"353\" data-attachment-id=\"1842\" data-permalink=\"https:\/\/365stack.in\/screenshot-91-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?fit=1306%2C720&amp;ssl=1\" data-orig-size=\"1306,720\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-91\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?fit=300%2C165&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?fit=640%2C353&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?resize=640%2C353&#038;ssl=1\" alt=\"\" class=\"wp-image-1842\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?resize=1024%2C565&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?resize=300%2C165&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?resize=768%2C423&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-91.png?w=1306&amp;ssl=1 1306w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">Sample PDF<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The above picture is a sample output, where a dynamic gallery is used, and as you see it is a total of 10 pages right even though it worked like a charm.<\/p>\n\n\n\n<p>Suppose if there are more data in the gallery which exceeds the delegation limit it may be handled using pagination in Power Apps and we cannot pass all the data from power apps. In such cases, we can construct HTML in Power Automate itself.<\/p>\n\n\n\n<p> Assume if the table part comes in the middle of a form, In that case we can send the top HTML portion and bottom HTML portion from Power Apps. Later those can be concatenated and we can continue from the &#8220;Create HTML file &#8221; part.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"409\" data-attachment-id=\"1517\" data-permalink=\"https:\/\/365stack.in\/index.php\/2021\/09\/17\/powerapps-print-form-to-pdf\/screenshot-120\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?fit=997%2C637&amp;ssl=1?v=1637334774\" data-orig-size=\"997,637\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-120\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?fit=300%2C192&amp;ssl=1?v=1637334774\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?fit=640%2C409&amp;ssl=1?v=1637334774\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?resize=640%2C409&#038;ssl=1\" alt=\"\" class=\"wp-image-1517\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?w=997&amp;ssl=1 997w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-120.png?w=768&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">Set the top portion variable<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Query the data and construct HTML<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" data-attachment-id=\"1518\" data-permalink=\"https:\/\/365stack.in\/index.php\/2021\/09\/17\/powerapps-print-form-to-pdf\/screenshot-119\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?fit=1125%2C633&amp;ssl=1?v=1637335466\" data-orig-size=\"1125,633\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-119\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?fit=300%2C169&amp;ssl=1?v=1637335466\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?fit=640%2C360&amp;ssl=1?v=1637335466\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119-1024x576.png?resize=640%2C360&#038;ssl=1\" alt=\"\" class=\"wp-image-1518\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-119.png?w=1125&amp;ssl=1 1125w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">Construct HTML<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Concatenate all the variables and pass them to the &#8220;Create file&#8221; action.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>concat(variables('toppdf'),variables('middlepdf'),variables('lowerpdf'))<\/code><\/pre>\n\n\n\n<p>Please post your queries in the comments. Happy Building \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the common requirements in any application is to print the data either to save the form as PDF or print the form. PowerApps provides Print() function to print the screen in a printable format, but the limitation is the screen height cannot be greater than 2164px. If a Scrollable screen is used for displaying a very large form [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[6,8,32,5],"tags":[12,46,33,9,10,18,97],"class_list":["post-1456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-canvas-apps","category-power-automate","category-power-platform","category-powerapps","tag-canvas-app","tag-microsoft-365","tag-power-platform","tag-powerapps","tag-powerautomate","tag-print-screen","tag-scrollable-screen"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2020\/10\/background1.jpg?fit=1920%2C1080&ssl=1?v=1623349406","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1414,"url":"https:\/\/365stack.in\/index.php\/2021\/08\/05\/a-complete-guide-for-migration-to-power-platform-best-practices\/","url_meta":{"origin":1456,"position":0},"title":"A Complete Guide for Migration to Power Platform: Best Practices","author":"Hemanthkumar Rajan","date":"August 5, 2021","format":false,"excerpt":"This is the 5th part of the migration series, Kindly read the previous post before proceeding further, Best Practices are the important aspect of the conversion life cycle. When you do an activity repeatedly it becomes a practice. If that practice brings success to the project then it is called\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/08\/best-practice-cover-e1628180613931.png?fit=600%2C280&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1310,"url":"https:\/\/365stack.in\/index.php\/2021\/07\/28\/a-complete-guide-for-migration-to-power-platform-analysis-development-part-2\/","url_meta":{"origin":1456,"position":1},"title":"A Complete Guide for Migration to Power Platform: Analysis &#038; Development &#8211; Part 2","author":"Hemanthkumar Rajan","date":"July 28, 2021","format":false,"excerpt":"This is a continuation post on the Analysis and Development series, have a look at Part -1 of this post for a better understanding. After properly analyzing the existing system, we might be in a good position to start the development. Let's see the list of things that should be\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"Requirement Analysis","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/07\/Requirement-Analysis.png?fit=1100%2C700&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1017,"url":"https:\/\/365stack.in\/index.php\/2021\/06\/05\/print-screens-in-your-canvas-app\/","url_meta":{"origin":1456,"position":2},"title":"Print screens in your canvas app","author":"Kanagaraj Neelamegan","date":"June 5, 2021","format":false,"excerpt":"Printing functionality in canvas apps.","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2020\/10\/background1.jpg?fit=1200%2C675&ssl=1%3Fv%3D1623349406&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1232,"url":"https:\/\/365stack.in\/index.php\/2021\/07\/04\/how-to-build-responsive-gallery-using-powerapps-canvas-app\/","url_meta":{"origin":1456,"position":3},"title":"How To Build Responsive Gallery using PowerApps | Canvas App","author":"Kanagaraj Neelamegan","date":"July 4, 2021","format":false,"excerpt":"Lets create responsive card view using gallery control in power apps.","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/07\/Responsivegallery.png?fit=1037%2C766&ssl=1%3Fv%3D1625418734&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1631,"url":"https:\/\/365stack.in\/index.php\/2021\/11\/27\/add-repeating-section-in-powerapps\/","url_meta":{"origin":1456,"position":4},"title":"Add repeating section in PowerApps","author":"Hemanthkumar Rajan","date":"November 27, 2021","format":false,"excerpt":"As we already discussed, Gallery is a multipurpose control in the canvas app. One of the use-cases of gallery is the repeating section, this scenario will be applicable between Parent-Child relationships in Lists or tables and if the form is converted from Nintex, InfoPath (OOTB repeating section control available there)\u2026","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-197.png?fit=1045%2C267&ssl=1%3Fv%3D1637926841&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1220,"url":"https:\/\/365stack.in\/index.php\/2021\/07\/05\/a-complete-guide-for-migration-to-power-platform-pre-development-analysis-part-1\/","url_meta":{"origin":1456,"position":5},"title":"A Complete Guide for Migration to Power Platform: Pre-Development Analysis &#8211; Part 1","author":"Hemanthkumar Rajan","date":"July 5, 2021","format":false,"excerpt":"If the application is going to be created from a new requirement, we can focus only on the Power Platform by analyzing the use cases of the requirement and a feasibility study should suffice for common scenarios like approval, functions, references, CRUD operations, integrations, performance, limitations has to be taken\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"Pre Development Analysis","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/07\/Requirement-Anlaysis-scaled.jpeg?fit=1200%2C829&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/1456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/comments?post=1456"}],"version-history":[{"count":8,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/1456\/revisions"}],"predecessor-version":[{"id":2494,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/1456\/revisions\/2494"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media\/542"}],"wp:attachment":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media?parent=1456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/categories?post=1456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/tags?post=1456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}