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

Community site session details

Session Id : CYglI7olielQBwOTjmq1Lq
Power Automate - Building Flows
Answered

Error 406 when converting .doc to pdf

Like (0) ShareShare
ReportReport
Posted on 10 Sep 2020 08:23:29 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!

I have the same question (0)
  • paulwyman Profile Picture
    3 on 21 Feb 2022 at 10:08:15
    Re: Error 406 when converting .doc to pdf

    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">"

  • mr-samd Profile Picture
    on 07 Oct 2021 at 09:45:49
    Re: Error 406 when converting .doc to pdf

    @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

     

  • Verified answer
    v-bacao-msft Profile Picture
    on 23 Sep 2020 at 02:32:14
    Re: Error 406 when converting .doc to pdf

     

    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,

  • RemcooV Profile Picture
    5 on 11 Sep 2020 at 11:18:47
    Re: Error 406 when converting .doc to pdf

    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!

     

     

  • v-bacao-msft Profile Picture
    on 11 Sep 2020 at 09:20:21
    Re: Error 406 when converting .doc to pdf

     

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 954 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 650 Moderator

#3
trice602 Profile Picture

trice602 327 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete