File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,16 +86,15 @@ page.onLoadFinished = (status) ->
8686 type : options .type || ' pdf'
8787 quality : options .quality || 75
8888
89- # Option 1: Output file to stdout
90- # Not working in Ubuntu 12.04 (at least not in my environment)
91- if options .buffer
92- system .stderr .write (' html-pdf: options.buffer is deprecated. Because of compatibility issues this method will no longer supported.\n ' )
93- page .render (' /dev/stdout' , fileOptions)
94-
95- # Option 2: Output filename to stdout
96- else
89+ if ! options .buffer
9790 filename = options .filename || (" #{ options .directory || ' /tmp' } /html-pdf-#{ system .pid } .#{ fileOptions .type } " )
9891 page .render (filename, fileOptions)
9992 system .stdout .write (filename)
10093
94+ # Deprecated options.buffer method
95+ else
96+ system .stderr .write (' html-pdf: options.buffer is deprecated. Because of compatibility issues this method is longer supported.\n ' )
97+ page .render (' /dev/stdout' , fileOptions)
98+
99+
101100 exit (null )
You can’t perform that action at this time.
0 commit comments