Mismatch in Page Count : DOCX to PDF using Sharepoint Graph API

Mani Wadhwa 1 Reputation point
2022-08-08T15:47:35.77+00:00

Hi Team,

I'm trying to convert docx file to pdf using SharePoint Graph API by calling this following GET request -

https://graph.microsoft.com/v1.0/sites/894f9bf8-01d7-471e-82ac-7354e4c21200/drive/root:/File_Conversion_Test/Header_Banner_Loss_Document.docx:/content?format=pdf

In the converted PDF file, there is a mismatch in the total number of pages.

If there are 238 pages in the original docx file, in the converted PDF, we found 237 pages.

In the converted PDF, we saw data got shifted to previous pages. For e.g. Data on page 51 got shifted to page 50, thus resulting into the total less pages.

I tried using OneDrive Connector in Power Automate as well to convert the docx to pdf but it has the same issue.

How can we overcome this limitation ? Is there any way to convert docx file to PDF keeping the same page count ?

Viva Connections
Viva Connections
A Microsoft Viva module that provides a gateway to a modern engagement experience.
87 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,739 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,761 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,692 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,116 Reputation points
    2022-08-09T08:36:38.42+00:00

    Hi @Mani Wadhwa ,

    According to my research and testing, I have not reproduce your problem, in my test, convert docx file to PDF using Graph API works well, and the number of pages does not change.

    Please try to do a troubleshooting, please check if other docx files convert to PDF has the same situation.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.