Easiest way to extract images from a MS Word Document using PHP?

前端 未结 4 756
广开言路
广开言路 2021-01-06 23:48

Is this possible to extract images from MS Word Documents using PHP? And if so, how?

Requirement: Definitely old-shool doc support, but preferably both old and new.<

4条回答
  •  一向
    一向 (楼主)
    2021-01-07 00:21

    If you are extracting images from older files you have a couple of options.

    Run a converter to update all files to DocX then use IntermediateHacker's code.

    Find the VBA code necessary to extract the images, and then either create a macro and call this code via PHP's COM interface functions or call the code yourself via these functions.

    The first thing to do though is find how to do it in VBA, that will make it much easier to do it in PHP.

提交回复
热议问题