File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,23 @@ $pdf = new Pdf(array(
188188));
189189```
190190
191+ ### Passing strings
192+
193+ Some options like ` header-html ` usually expect a URL or a filename. With our
194+ library you can also pass a string. The class will try to detect if the
195+ argument is a URL, a filename or some HTML or XML content. To make detection
196+ easier you can surround your content in ` <html> ` tag.
197+
198+ If this doesn't work correctly you can also pass an instance of our ` File `
199+ helper as a last resort:
200+
201+ ``` php
202+ use mikehaertl\tmp\File;
203+ $options = [
204+ 'header-html' => new File('Complex content', '.html'),
205+ ];
206+ ```
207+
191208## Error handling
192209
193210` send() ` , ` saveAs() ` and ` toString() ` will return ` false ` on error. In this case the detailed error message is
You can’t perform that action at this time.
0 commit comments