Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions samples/convert-sharepoint-library-doc-file-to-pdf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Convert SharePoint Document File to PDF

## Summary

This sample demonstrates how to convert document file to pdf.

![picture of the flow](assets/flow.png)

## Applies to

![Power Apps](https://img.shields.io/badge/Power%20Apps-No-red "No")
![Power Automate](https://img.shields.io/badge/Power%20Automate-Yes-green "Yes")
![Power BI](https://img.shields.io/badge/Power%20BI-No-red "No")
![Power Pages](https://img.shields.io/badge/Power%20Pages-No-red "No")
![Power Virtual Agents](https://img.shields.io/badge/Power%20Virtual%20Agents-No-red "No")
![Dataverse](https://img.shields.io/badge/Dataverse-No-red "No")
![AI Builder](https://img.shields.io/badge/AI%20Builder-No-red "No")
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-No-red "No")
![Power Fx](https://img.shields.io/badge/Power%20Fx-No-red "No")

## Compatibility

![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-red.svg "Premium license not required")
![Experimental Features](https://img.shields.io/badge/Experimental%20Features-No-red.svg "Does not rely on experimental features")

## Contributors
* [Chandani Prajapati](https://github.com/chandaniprajapati)

## Version history

Version|Date|Comments
-------|----|--------
1.0|Sep 09, 2022|Initial release
2.0|October 07, 2025|Migration from powerapps-samples repository with solution repacking by [Jan Chlebek](https://github.com/jan-chlebek)

## Minimal Path to Awesome
* [Download](./solution/convert-sharepoint-library-doc-file-to-pdf.zip) the `.zip` from the `solution` folder
* Within **Power Automate**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.

## Features

This sample demonstrates the following concepts:

* Get file content when a file is created to document library
* Create an actual file to Onedrive
* Convert a file to PDF
* Create a PDF file to Onedrive
* Create a newly generated PDF file to document library
* Delete actual and a PDF file from Onedrive



## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=convert-sharepoint-library-doc-file-to-pdf&authors=@chandaniprajapati&title=convert-sharepoint-library-doc-file-to-pdf%20-%20).

For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=convert-sharepoint-library-doc-file-to-pdf&authors=@chandaniprajapati&title=convert-sharepoint-library-doc-file-to-pdf%20-%20).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=convert-sharepoint-library-doc-file-to-pdf&authors=@chandaniprajapati&title=convert-sharepoint-library-doc-file-to-pdf%20-%20).

## For more information

- [Create your first flow](https://docs.microsoft.com/en-us/power-automate/getting-started#create-your-first-flow)
- [Microsoft Power Automate documentation](https://docs.microsoft.com/en-us/power-automate/)

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/convert-sharepoint-library-doc-file-to-pdf" aria-hidden="true" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[
{
"name": "pnp-powerplatform-samples-convert-sharepoint-library-doc-file-to-pdf",
"source": "pnp",
"title": "Convert sharepoint library document file to pdf",
"shortDescription": "his sample shows how to convert a doc file to a pdf in the document library.",
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/convert-sharepoint-library-doc-file-to-pdf",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/convert-sharepoint-library-doc-file-to-pdf",
"longDescription": [
"This sample shows how to convert a doc file to a pdf in the document library."
],
"creationDateTime": "2022-09-20",
"updateDateTime": "2025-10-07",
"products": [
"Power Automate",
"PowerPlatform-samples"
],
"tags": [
"SHAREPOINT", "PERMISSIONS"
],
"categories": [
"CLOUD-FLOW"
],
"metadata": [
{
"key": "POWERAPPS-EXPERIMENTAL",
"value": "No"
},
{
"key": "POWERAPPS-PREMIUM",
"value": "No"
},
{
"key": "POWERAPPS-ONPREM",
"value": "No"
},
{
"key": "POWERAPPS-CUSTOMCONNECTOR",
"value": "No"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/convert-sharepoint-library-doc-file-to-pdf/assets/flow.png?raw=true",
"alt": "Preview PNG"
}
],
"authors": [
{
"gitHubAccount": "chandaniprajapati",
"name": "Chandani Prajapati",
"pictureUrl": "https://avatars.githubusercontent.com/u/52065929?v=4"
}
],
"references": [
{
"name": "Create your first flow",
"description": "Anyone from a basic business user to an IT professional can create automated processes using Power Automate's no-code/low-code platform.",
"url": "https://docs.microsoft.com/en-us/power-automate/getting-started#create-your-first-flow"
},
{
"name": "Microsoft Power Automate documentation",
"description": "Power Automate is a service that helps you create automated workflows between your favorite apps and services to synchronize files, get notifications, collect data, and more.",
"url": "https://docs.microsoft.com/en-us/power-automate/"
}
]
}
]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25093.138" OrganizationSchemaType="Full" CRMServerServiceabilityVersion="9.2.25095.00139">
<Entities />
<Roles />
<Workflows />
<FieldSecurityProfiles />
<Templates />
<EntityMaps />
<EntityRelationships />
<OrganizationSettings />
<optionsets />
<CustomControls />
<EntityDataProviders />
<connectionreferences>
<connectionreference connectionreferencelogicalname="pnp_sharedonedriveforbusiness_e43de">
<connectionreferencedisplayname>OneDrive for Business convertsharepointlibrarydocfiletopdf-e43de</connectionreferencedisplayname>
<connectorid>/providers/Microsoft.PowerApps/apis/shared_onedriveforbusiness</connectorid>
<iscustomizable>1</iscustomizable>
<promptingbehavior>0</promptingbehavior>
<statecode>0</statecode>
<statuscode>1</statuscode>
</connectionreference>
<connectionreference connectionreferencelogicalname="pnp_sharedsharepointonline_b7de6">
<connectionreferencedisplayname>SharePoint convertsharepointlibrarydocfiletopdf-b7de6</connectionreferencedisplayname>
<connectorid>/providers/Microsoft.PowerApps/apis/shared_sharepointonline</connectorid>
<iscustomizable>1</iscustomizable>
<promptingbehavior>0</promptingbehavior>
<statecode>0</statecode>
<statuscode>1</statuscode>
</connectionreference>
</connectionreferences>
<Languages>
<Language>1033</Language>
</Languages>
</ImportExportXml>
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<ImportExportXml version="9.2.25093.138" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25093.138" OrganizationSchemaType="Full" CRMServerServiceabilityVersion="9.2.25095.00139">
<SolutionManifest>
<UniqueName>convertsharepointlibrarydocfiletopdf</UniqueName>
<LocalizedNames>
<LocalizedName description="convert-sharepoint-library-doc-file-to-pdf" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="This sample demonstrates how to convert document file to pdf." languagecode="1033" />
</Descriptions>
<Version>1.0.0.0</Version>
<Managed>0</Managed>
<Publisher>
<UniqueName>Microsoft_365_and_Power_Platform_Community</UniqueName>
<LocalizedNames>
<LocalizedName description="Microsoft 365 &amp; Power Platform Community" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="Microsoft community sample publisher" languagecode="1033" />
</Descriptions>
<EMailAddress xsi:nil="true"></EMailAddress>
<SupportingWebsiteUrl>https://pnp.github.io/</SupportingWebsiteUrl>
<CustomizationPrefix>pnp</CustomizationPrefix>
<CustomizationOptionValuePrefix>89378</CustomizationOptionValuePrefix>
<Addresses>
<Address>
<AddressNumber>1</AddressNumber>
<AddressTypeCode>1</AddressTypeCode>
<City xsi:nil="true"></City>
<County xsi:nil="true"></County>
<Country xsi:nil="true"></Country>
<Fax xsi:nil="true"></Fax>
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
<Latitude xsi:nil="true"></Latitude>
<Line1 xsi:nil="true"></Line1>
<Line2 xsi:nil="true"></Line2>
<Line3 xsi:nil="true"></Line3>
<Longitude xsi:nil="true"></Longitude>
<Name xsi:nil="true"></Name>
<PostalCode xsi:nil="true"></PostalCode>
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
<ShippingMethodCode>1</ShippingMethodCode>
<StateOrProvince xsi:nil="true"></StateOrProvince>
<Telephone1 xsi:nil="true"></Telephone1>
<Telephone2 xsi:nil="true"></Telephone2>
<Telephone3 xsi:nil="true"></Telephone3>
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
<UPSZone xsi:nil="true"></UPSZone>
<UTCOffset xsi:nil="true"></UTCOffset>
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
</Address>
<Address>
<AddressNumber>2</AddressNumber>
<AddressTypeCode>1</AddressTypeCode>
<City xsi:nil="true"></City>
<County xsi:nil="true"></County>
<Country xsi:nil="true"></Country>
<Fax xsi:nil="true"></Fax>
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
<Latitude xsi:nil="true"></Latitude>
<Line1 xsi:nil="true"></Line1>
<Line2 xsi:nil="true"></Line2>
<Line3 xsi:nil="true"></Line3>
<Longitude xsi:nil="true"></Longitude>
<Name xsi:nil="true"></Name>
<PostalCode xsi:nil="true"></PostalCode>
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
<ShippingMethodCode>1</ShippingMethodCode>
<StateOrProvince xsi:nil="true"></StateOrProvince>
<Telephone1 xsi:nil="true"></Telephone1>
<Telephone2 xsi:nil="true"></Telephone2>
<Telephone3 xsi:nil="true"></Telephone3>
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
<UPSZone xsi:nil="true"></UPSZone>
<UTCOffset xsi:nil="true"></UTCOffset>
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
</Address>
</Addresses>
</Publisher>
<RootComponents>
<RootComponent type="29" id="{9d4854e3-bba3-f011-bbd3-6045bd08b2ce}" behavior="0" />
</RootComponents>
<MissingDependencies />
</SolutionManifest>
</ImportExportXml>
Loading