Modify Document before Download

Hi
i have a Word Document stored in Database. In Grid View i can download it with the link displayed.
Is it possible to modify the Word Document before the download starts?

I know how to modify a Word Document with PHPWord. But i didn’t see any possibility to catch the Document after the user click the Link.

Thank’s for your help!
Steve

I think you can use a blank app, so you can modify your document.

Hi, thank’s for the answer.
Yes in blank app i can programm anything myself but not can use the advantage of the “Document(Database)” Field. I only need a hook before the document is sent to the browser, if i click the download link.

Best regards
Steve

What are you wanting to modify about the Word doc?

I use PHPWord to replace some placeholders in the document with values in den DB.

The code works fine, i use the Action Bar to trigger it at the moment. But because the link of the Document exists allready in the grid with a “Document(Database)” Field, it would be more straightforward… :slight_smile:

You can use a blank app, open the doc, modify it with PHPWord and download it with code.
Call the blank app from the Action Bar.

I have an app that do the same with PHPWord library.

Regards.

Exactly what i do at the Moment (see my post above).

Thank’s for your answer anyway.
Steve

Sorry, I do not understand what your problem is?

The built in field “Document(Database)” has an allready built in Interface to upload, modify and download a Document. If it has a hook (event) to modify the file AFTER cklicking it to download but BEFORE the download starts, then i not need any action bars, blank_apps, …

Best regards
Steve