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
These are some issues related to the OneDrive API, which might be helpful to figure out the issue