I am trying to use the following function to create pdf of the data of my gallery from my screen:
Office365Outlook.SendEmailV2(user().Email,"My First expo pdf from powerapp","power app report",{Attachments:Table({Name:"SearchRepo1.pdf",ContentBytes:PDF(Gallery4)})})
Please check and advise the correction required.
Note : I have properly followed the connector process and connected the outlook account.
As you showed, container and orientation should be together, so it should as below
ContentBytes: PDF(Gallery4 , {Expandcontainer:true},{ Orientation : Landscape,Size:Papersize.A1,Margin:"24pt 24pt 24pt 24pt"})
Please guide I am ok with the syntax or orientation should be before expand.
Also, can you guide me how to know the current export size of pdf, this will help me to make adjustment
Hi @MIA27 ,
About orientation used after galley
PDF(Galleydata,{ Orientation : Landscape,Size:Papersize.A1,Margin:"24pt 24pt 24pt 24pt"})
Thanks,
Dear Chitrakant
Thank you for your time and advise,
Expand container I already used after posting the question, earlier only screen was getting exported.
And about orientation syntax where to be used?. after which line, any web link where it is explained.
Also, how to know the current exported pdf - was of what size. any default of the code is there.
I tried to find the exported page size from my acrobat reader but could not.
This will give me an in declaration of orientation.
regards
HI @MIA27 ,
Use expandcontaine after gallery
Office365Outlook.SendEmailV2(
User().Email,
"Subject to be here PowerApp of serial " & FindSerialNo.Text,
"Email to be here of powerapp",
{
Attachments: Table(
{
Name: "ServiceDataRepo.pdf",
ContentBytes: PDF(Gallery4 , {Expandcontainer:true})
}
)
}
)
For kind your info -
PDF also have { Orientation : Landscape,Size:Papersize.A1,Margin "24pt 24pt 24pt"}
Thanks,
Got stuck in paper size of the pdf. if it is more than one page the last line etc gets cut.
How to adjust this in A4 size, so what ever fits it will be there, rest to be in next page.
I saw some code in Reza video, but how to bring to my code .
Please guide the add line in the below code to fix this issue :
Office365Outlook.SendEmailV2(
User().Email,
"Subject to be here PowerApp of serial " & FindSerialNo.Text,
"Email to be here of powerapp",
{
Attachments: Table(
{
Name: "ServiceDataRepo.pdf",
ContentBytes: PDF(Gallery4)
}
)
}
)
Image of the page is as below
Pls note above that the first page portion cut and came in next page top , same happening with every page
I also wanted to confirm you about the below:
The app is under development and my email id in outlook connector which is connected. It started working fine, it is exporting with attachment.
Later the app will be given to another user's who also are in the same environment of sharepoint and outlook with different email id.
So the pdf creation button will work for them from their mobile ?. No issue ?.
please guide.
Thank you it worked,
But very strange when written in single line its a problem. The same written by you in coding which I copied and pasted it worked. Which means I am unable to track the space, but i checked several times.
For my learning, you people write the code directly or use another app for writing.
Regards
Hi @MIA27 ,
This is my test code -
Office365Outlook.SendEmailV2(
User().Email,
"PDF File",
"Galley file",
{
Attachments: Table(
{
Name: "Galleryfile.pdf",
ContentBytes: PDF(Gallery2_3)
}
)
}
)
sorry, tried same result.
deleted and reconnected but still same error.
can you please paste your test code
so that i can cross check
WarrenBelz
146,537
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,908
Most Valuable Professional