• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Save generated pdf file into server

The user creates a pdf from the form pdf button and by default that file is downloaded into the browser. We have a need to store the file in that operation also to some specific location into server for archive/reference purpose. It will be linked to the form concept. I can't find any means to achieve this. Any ideas or tips?
 
Not really, no. It's probably possible, but not with anything currently in the Fabrik toolbox. It'd need some custom coding.

-- hugh
 
Yes , I realize that. Can u give us some hints where to put the "custom coding"? in view.pdf.php? Is the pdf output available somewhere?
 
For now we "accept" that the pdf is downloaded and then we drop it into a document form field to be uploaded. We want the file to be stored into document field directly .
 
I should have been more specific. I have no idea how to do this, without coding it into the pdf view directly, ie modifying core code.

Sent from my HTC One using Tapatalk
 
I?m interested in this kind of functionality too. searching on google I?ve found this

Automatically Saving a dynamic PDF to the remote server using DOMPDF
You can do one thing like below which i am doing for my application. First create a folder in your server under the root directory for example. Then change read write permissions to that folder using chmod command.

Then get all the code in $html string.

$dompdf->load_html($html);
$dompdf->render();
$pdf = $dompdf->output();
$file_location = $_SERVER['DOCUMENT_ROOT']."app_folder_name/pdfReports/".$pdf_name.".pdf";
file_put_contents($file_location,$pdf);
Where pdfReports is the folder which i created to save all the pdf's. You can change to your folder name.

I don?t know to perform the changes needed to include that code in /libraries/dompdf/dompdf.php, any idea?
 
Last edited:
You'd have to do it in our PDF renderer, in ./libraries/joomla/document/pdf/pdf.php, around line 157 where we currently stream() the doc to the browser. But as you'd be modifying core code, you'd have to either re-apply your changes after every update, or maintain your own fork of Fabrik.

This is potentially something that could be added as a global option, something like "archive PDF's", if someone wants to do the work and submit a PR on github.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top