WriteHTML($stylesheet,1); //Write some HTML code: $title = $_POST['field_00'];//returns an array $field1Items= $_POST['field_01']; function fillItems($field_name){ $item = ''; $fieldItems= $_POST[$field_name]; for($i=0; $i'; } return $item; } $html='
Project name: '.$title[0].'
Date: '.$title[1].'

1. Individuals Affected

'.fillItems("field_01").'

2. Organisations and Groups Affected

'.fillItems("field_02").'

3. Products and Services provided

'.fillItems("field_03").'

4. Resources needed

'.fillItems("field_04").'

5. Changes in Behaviour

'.fillItems("field_05").'

6. Changes in Relations

'.fillItems("field_06").'

7. Group Interests

'.fillItems("field_07").'

8. Public Sphere

'.fillItems("field_08").'

9. Impact of product or service failure

'.fillItems("field_09").'

10. Impact of use of resources

'.fillItems("field_10").'

11. Social Conflicts

'.fillItems("field_11").'

12. Resolving ethical impacts

'.fillItems("field_12").'

Ethics Canvas v1.7|© ADAPT Center & Trinity College Dublin & Dublin City University, 2016 The Ethics Canvas is adapted from Alex Osterwalder’s Business Model Canvas. The Business Model Canvas is designed by: Business Model Foundry AG. This work is licensed under the Creative Commons Attribution-Share Alike 3.0 unported license. View a copy of this license at: https://creativecommons.org/licenses/by-sa/3.0/. View the original Business Model Canvas at https://strategyzer.com/canvas. Contact us at: hello@ethicscanvas.org

ethics-canvas-license-icon
'; $mpdf->WriteHTML($html,2); if (isset($_POST['share-canvas'])) { // Share Canvas clicked: save on server $mpdf->Output('../saved-pdf/Ethics-Canvas.pdf','F'); } else { // Export PDF clicked: download $mpdf->Output('Ethics-Canvas.pdf', 'D'); } /* There are 3 ways to get the pdf: A. open the pdf in the users browser--> $mpdf->Output(); B. force download the pdf to the users device --> $mpdf->Output('name-of-file.pdf', 'D'); c. Save the pdf file on our server on the url that we say $mpdf->Output('my-directory/saved.pdf','F'); */ // A. Output a PDF file directly to the browser // $mpdf->Output(); //B. Adding the 'D' parameter for download to user's device // $mpdf->Output('OnlineEthicsCanvas.pdf', 'D'); //C. adding the 'F' to save the file //$mpdf->Output('../saved-pdf/Ethics-Canvas.pdf','F'); // Close the window after creating the PDF echo ""; ?>