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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Peninput turning black...
Power Apps
Suggested Answer

Peninput turning black in PDF

(0) ShareShare
ReportReport
Posted on by 39
 
 
Hello all
 
I hope you're all good
 
I am creating an app that requires people to sign so I used the peninput control.
 
I have a button that generates the pdf (Thanks to Reza)
 
Generate PDF button OnSelect property
Set(varPdfGen2, true);
Set(pdfContent2,JSON(PDF(ScreenContainer5,{ExpandContainers:true}),JSONFormat.IncludeBinaryData));
Notify("PDF Generated", NotificationType.Success,3000);
Set(varPdfGen2, false);
 
I then have an attachment control with this in items property where I can download the pdf
 [{Name:DropdownCanvas2_3.Selected.Title &".pdf",Value:Substitute(pdfContent2,"""","")}]
 
The PDF is created and it works fine but on the pdf the peninput is all black 
 
First pic is from power apps and second when the pdf is created (so from the pdf)
 
 
I've tried looking online but unsure what's causing this...

Thanks

Vince
Categories:
I have the same question (0)
  • Suggested answer
    victorcp Profile Picture
    2,350 Moderator on at
    Hey! hope you are doing well
     
    Unfortunately this is how PDF function works, but there is a workaround :)
     
    First create a image behind your pen input (here I put it below to make it easier to understand, added button to generate the PDF and the PDF viewer to show the generated PDF)
    in the image property of the Image, set it as '<your pen input name>.Image'

     
    You have to turn on and off the visibility of your pen input, for that you can use 'varPdfGen2', but I don't know why you use it, so it will be better to create a new variable, like this:
     
    Set(penControlVisibility, false);
    Set(varPdfGen2, true);
    Set(pdfContent2,JSON(PDF(ScreenContainer5,{ExpandContainers:true}),JSONFormat.IncludeBinaryData));
    Notify("PDF Generated", NotificationType.Success,3000);
    Set(varPdfGen2, false);
    Set(penControlVisibility, true);
     
    Update the pen input visible property to: penControlVisibility
     
    Remember to put your image behind the pen input
    make sure the position of both components are equal
     
    you can also set the image positions properties refer the pen input as below
     
    And that's it:
     
    Hope it helps :)
  • VA-31070842-0 Profile Picture
    39 on at
     
    It works wonders you! Should have thought of that.
    I was hoping there was some kind of setting I had to switch on ah ah.
     
    Appreciate the assist
     
    All the best
     
    Vince

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard