Open itsdeo opened 4 years ago
Looking for the same case, Any help?
Wait.. Isn't it this library only works in local filesystem? I think you need to download the s3 file to a temp path and use that path to convert.
You can download the file from s3 into your local machine using the following code. function loadFile($templateFile,$fields,$results){ try{ $headers = @getheaders($templateFile); if ($headers && strpos($headers[0], '200') !== false) { $localfilepath = envpath("common"). "assets/tmp/dummy". time() . ".pptx"; if($contents = file_get_contents($templateFile)){ file_put_contents($localfilepath, $contents); } } } }
After all the processing, you can delete the downloaded file using unlink function.
Hi There,
I am implementing Office-converter to convert PPT to PDF but I am getting error like
message: File does not exist --http://s3-eu-west-2.amazonaws.com/SomeDirName/SomeFile.ppt I checked file is exists but showing above error message.
I used code like : $converter = new OfficeConverter($request->s3_url); $converter->convertTo('output_file.pdf'); //generates pdf file in same directory as test-file.docx
Please help me on this
Thank you!