Graph Api is not formatting html to PDF

Roopam Dutta 0 Reputation points
2024-05-17T05:02:59.45+00:00

Hi,

we are using graph api to convert html document into PDF, it was working before but now all the images in the div comes on top left corner overlapped. could anyone please help on this.

Saved HTML DOC:

User's image

PDF converted using Graph:

User's image

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AsithwMSFT 1,445 Reputation points Microsoft External Staff
    2024-05-19T21:09:23.5966667+00:00

    Hi Roopam,

    What API are you using for this task?

    According to below Graph API documentation, It does not show Html as supported source extensions for Pdf format

    https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http#format-options

    These are some issues related to the OneDrive API, which might be helpful to figure out the issueUser's image

    https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get_content_format?view=odsp-graph-online#known-issues-with-html-to-pdf-conversion

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.