Forum


Replies: 4   Views: 450
Return a docx as a stream
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by khalid-s  · 01-02-2024 - 22:43

Also can you correct the way i am trying to retrieve the document from the API:

 

public function index(HttpClientInterface $http): Response
{
    $response = $http->request(Request::METHOD_GET, 'https://dev.doc.ey');

    $doc = new DOCXStructureFromStream;
    $doc->generateDOCXStructure($response->getContent());

    dd($doc);

    return $this->render('app/index.html.twig', [
        'controller_name' => 'AppController',
    ]);
}

 

Thanks in advance