Skip to content

Unable to read .doc files #695

Closed
Closed
@mayankitt

Description

@mayankitt

Hello,
I am trying to load 97-2003 MS Word documents but the following error keeps showing up.

image

Following is simply an adaptation of the code provided in the Sample_11_ReadWord97.php file:

        $source = "OldDoc.doc";
        echo "Reading document ".$source."<br><br>";
        if(str_contains($source, '.docx'))
            $phpWordObj = IOFactory::load($source);
        elseif(str_contains($source, '.doc'))
            $phpWordObj = IOFactory::load($source, 'MsDoc');
        echo "Document reading complete";

I am using Laravel 5.1 and docx files seem to load just fine. Any idea where I might be going wrong with this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions