Power apps PDF Viewer SharePoint document Library without Flow

Loading

Requirement: Power apps PDF Viewer SharePoint Document library without Flow

Take SharePoint Document library which contains Templated like Word document , Excel sheet, Power point presentation, etc.., . Create a Blank canvas app add Data Source to the screen and add vertical gallery add data to it.

Now add Image to the screen on Image write the below code

Image Property: Gallery8.Selected.Thumbnail.Large

Now Add PDF View(Experimental) control to the screen place it on Image and write the code below

On Document Property:  
If(
    Last(
        Split(
            Gallery8.Selected.'File name with extension',
            "."
        )
    ).Value = "pdf",
    "/:i:/s/ApprovalProcessPK/EZm9pd0AkchLognpsyWCtf0BzRMW9xWUKhTDRHaC6j9Dcg?e=pdf" & EncodeUrl(Gallery8.Selected.'Folder path' & Gallery8.Selected.'File name with extension'),
    Substitute(
        Gallery8.Selected.Thumbnail.Large,
        "/thumbnail",
        "/pdf"
    )
)

Visible Property: 
With(
    { 
    fileextention: Last(
Split(Gallery8.Selected.'File name with extension',".")
).Value
 },
If(fileextention="xlsx"||fileextention="docx"||fileextention= "ppt"||fileextention="pdf",true,false))

When user select an item in gallery it display on PDF Viewer. If the selected item is in PDF file then the PDF viewer doesn’t display any item present in the file.

Leave a Reply

Your email address will not be published. Required fields are marked *