Permalink
Browse files

Added DOMPDF and README

  • Loading branch information...
0 parents commit 6acf4e8747aa06b0b379694110a3a5455af4821f @shadowhand committed Nov 18, 2009
Showing with 24 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +20 −0 README.md
  3. +1 −0 vendor/dompdf
3 .gitmodules
@@ -0,0 +1,3 @@
+[submodule "vendor/dompdf"]
+ path = vendor/dompdf
+ url = git://github.com/shadowhand/dompdf
20 README.md
@@ -0,0 +1,20 @@
+# PDF View
+
+Extension for Kohana's View class that renders as a PDF instead of HTML. Uses [DOMPDF](http://code.google.com/p/dompdf/) to render normal HTML views as PDF Files.
+
+**Please report all bugs related to PDF rendering to the [DOMPDF issue tracker](http://code.google.com/p/dompdf/issues/list).**
+
+## Usage
+
+Placed in a controller action:
+
+ // Load a view using the PDF extension
+ $pdf = View_PDF::factory('pdf/example');
+
+ // Use the PDF as the request response
+ $this->request->response = $pdf;
+
+ // Display the PDF in the browser as "my_pdf.pdf"
+ // Remove "inline = TRUE" to force the PDF to be downloaded
+ $this->request->send_file(TRUE, 'my_pdf.pdf', array('inline' => TRUE));
+
1 vendor/dompdf
@@ -0,0 +1 @@
+Subproject commit 4a61d75553699da2108a961b66ca776f37254dd5

1 comment on commit 6acf4e8

@sajed1710

cool....

Please sign in to comment.