Hello @Yamilla Manjko
Thanks for reaching out!
As far as I know, currently Graph API does not support conversion of an encrypted Word document into PDF format. You first need to remove the encryption of the docx file, & then convert it into PDF format.
Endpoint- GET /drive/items/{item-id}/content?format=pdf
Available format options in v1.0-
https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http#format-options
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.