cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JurSap82
Frequent Visitor

Margin zero still leaves Margin in PDF function Canvas App

Hi,

I'm using the PDF function in my Canvas app to make a print of a container component.

I need to print to turn out as full screen in my PDF. But with setting the Margin to 0, I still get unwanted white space on the left and bottom.
Does anyone have a tip for how to get it full screen? 

Set(
  gblPdfBlob,
     PDF(
        cntDesignTemplate,
         {
             Orientation: Landscape,
             Size: PaperSize.A4,
             Margin: "0pt"
         }
  )
);




Component cntDesignTemplate in Canvas app (used in PDF function):
Untitled14.png

PDF (has white space on the right and bottom):
Untitled13.png 


1 ACCEPTED SOLUTION

Accepted Solutions
cha_cha
Resident Rockstar
Resident Rockstar

Hello @JurSap82 

 

Try to increase your container size.

 

for an A4 size Landscape, you should ensure that your Container has at least this dimension:

1366 x 965. This will ensure that it will fill the whole table.

 

cha_cha_0-1670052365866.png

cha_cha_1-1670052445189.png

 

Here is the actual PDF output, hitting all corners right.

 

cha_cha_2-1670052477108.png

 

 


 ✔️
Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION.   This helps community members if they experience a similar issue in the future.

 

 🔗
  🕸  bistek.space  🐦 @cha_bistek  📺  @BisTekSpace 

 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

View solution in original post

3 REPLIES 3
cha_cha
Resident Rockstar
Resident Rockstar

Hello @JurSap82 

 

Try to increase your container size.

 

for an A4 size Landscape, you should ensure that your Container has at least this dimension:

1366 x 965. This will ensure that it will fill the whole table.

 

cha_cha_0-1670052365866.png

cha_cha_1-1670052445189.png

 

Here is the actual PDF output, hitting all corners right.

 

cha_cha_2-1670052477108.png

 

 


 ✔️
Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION.   This helps community members if they experience a similar issue in the future.

 

 🔗
  🕸  bistek.space  🐦 @cha_bistek  📺  @BisTekSpace 

 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 
JurSap82
Frequent Visitor

Thank you @cha_cha!

That was very helpful to understand what the problem was with the extra margin. Making the component height bigger than the tablet screen size height was an option, but not exactly what I was looking for. But eventually it turns out that changing the size in the PDF function to A5 works for me too. Now, I did not have to change any of the layout of the component or screen.

Set(
  gblPdfBlob,
     PDF(
        cntDesignTemplate,
         {
             Orientation: Landscape,
             Size: PaperSize.A5,
             Margin: "0pt"
         }
  )
);

cha_cha
Resident Rockstar
Resident Rockstar

Hello @JurSap82 

I'm glad you got it sorted out. 


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,891)