web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error 406 when convert...
Power Automate
Answered

Error 406 when converting .doc to pdf

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I have created a flow in which a .doc or .docx file is uploaded, converted to PDF, after which the .doc or .docx is deleted.

I've split the two document types in two strings. 

However, with the .doc side of the flow I get this error message:

RemcooV_0-1599726162620.png

I use almost the exact same data on the .docx site, yet not error there.

Any idea how I can fix this?

 

Thanks in advance!

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @RemcooV ,

     

    Can you switch the language to English so that we can check the error message?

     

    In addition, could you share all the configuration of Flow so that we can do the further analysis?

     

    Best Regards,

  • RemcooV Profile Picture
    5 on at

    Hi @v-bacao-msft,

     

    Unfortunatelty, I cannot change the language due to it being a work account.

    But this is my flow:

    RemcooV_0-1599822809029.png

    RemcooV_1-1599822974957.png

     

    So when an item is created and properties are taken, the doc and docx. split.

    Then the doc is converted to a PDF after which the doc is deleted.

     

    The error Message translates to something like:

    "Conversion of this file to PDF is not supported".

     

    When I upload a .docx file, the flow works fine, with a .doc not.

     

    I just need to be able to convert a .doc or .docx to PDF.

     

    If there is any more info you need, just let me know.

     

    Thanks in advance!

     

     

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @RemcooV ,

     

    Sorry for my late reply! Has this problem been resolved?

     

    I did a test on my side, and it seems that this is related to the Create file action. If you are converting the doc file created by the Create file action, then it cannot be converted to pdf.

     

    Similarly, I created the doc file manually and used the Convert file action to convert it to PDF without any problems.

     

    Both doc and docx displayed in the document support conversion to PDF.

    https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get_content_format?view=odsp-graph-online#format-options

     

    Best Regards,

  • mr-samd Profile Picture
    on at

    @v-bacao-msft wrote:

     

    "If you are converting the doc file created by the Create file action, then it cannot be converted to pdf."

     

    Is there any reason for this? what can i do to get around this issue?

    thanks

     

  • paulwyman Profile Picture
    3 on at

    You can convert a file created by the 'Create File Action'.

     

    I was getting a 406 error saying the file could not be converted, but it turns out the files has to be XHTML Validated first. If your HTML fails any validation you will get this error. Search for an XHTML Validator, I used https://validator.w3.org/, Then once it has been checked out try creating your HTML file in OneDrive again and then converting it. 

     

    My file was missing the following from the top, and this was enough to stop it from working. 🙂

     

    "<!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard