web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / creating a timesheet
Power Apps
Answered

creating a timesheet

(0) ShareShare
ReportReport
Posted on by 8
good morning to all,
i have created a timesheet for our users to fill out (see below),  when the user clicks on the envelope to email the form comes out way to small, how can i get it to be emailed so i can print it 8 1/2" x 11". i have entered the code into the button but have had no luck. any suggestions? thanks in advanced. 
 
Office365Outlook.SendEmailV2(User().Email,"TimeSheet","TimeSheet Form PDF from Power Apps",
{Attachments:Table({Name:"TimeSheetForm.pdf",ContentBytes:PDF(timesheet), Size:PaperSize.Letter, Orientation:PaperOrientation.Landscape})})
 
 
Categories:
I have the same question (0)
  • Verified answer
    Giraldoj Profile Picture
    762 Super User 2025 Season 2 on at

    Hi there,

    You're very close! The issue lies in how you're passing the Size and Orientation properties — they're not part of the Attachments table but instead should be part of the PDF() function call.

    According to the official Microsoft documentation, the PDF() function accepts a second argument with optional configuration settings, such as page size, orientation, margins, etc.

    So instead of this:

    Office365Outlook.SendEmailV2(
      User().Email,
      "TimeSheet",
      "TimeSheet Form PDF from Power Apps",
      {
        Attachments: Table({
          Name: "TimeSheetForm.pdf",
          ContentBytes: PDF(timesheet),
          Size: PaperSize.Letter,
          Orientation: PaperOrientation.Landscape
        })
      }
    )
    

    You should structure it like this:

    Office365Outlook.SendEmailV2(
      User().Email,
      "TimeSheet",
      "TimeSheet Form PDF from Power Apps",
      {
        Attachments: Table({
          Name: "TimeSheetForm.pdf",
          ContentBytes: PDF(timesheet, {
            Size: "Letter",
            Orientation: "Landscape"
          })
        })
      }
    )
    

    This version correctly places Size and Orientation inside the second argument of the PDF() function, which will generate a properly formatted 8.5" x 11" landscape PDF.

    Let me know if you also want to adjust margins or expand containers — you can add those as well inside the same record.

    Hope this helps!

  • PR-26082034-0 Profile Picture
    8 on at
    Giraldoj, thanks that helped! also you mentioned "Let me know if you also want to adjust margins or expand containers — you can add those as well inside the same record."
    yes please the more i know the better. 
  • Giraldoj Profile Picture
    762 Super User 2025 Season 2 on at
    Hi,
     
    sure, you can expand about the use of PDF function and the Expand property of the PDF action in the following video
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard