File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 0.2.0
2+ =====
3+ - Support remote images in html template
4+
5+
160.1.3
27=====
38- Update phantomjs node module dependency, some cdn changed
Original file line number Diff line number Diff line change 5656
5757page .paperSize = paperSize
5858
59+ page .onLoadFinished = (status ) ->
60+ # Output to parent process
61+ fileOptions =
62+ type : options .type || ' pdf'
63+ quality : options .quality || 75
5964
65+ # Option 1: Output file to stdout
66+ # Not working in Ubuntu 12.04 (at least not in my environment)
67+ if options .buffer
68+ page .render (' /dev/stdout' , fileOptions)
6069
61- # Output to parent process
62- fileOptions =
63- type : options .type || ' pdf'
64- quality : options .quality || 75
6570
66- # Option 1: Output file to stdout
67- # Not working in Ubuntu 12.04 (at least not in my environment)
68- if options .buffer
69- page .render (' /dev/stdout' , fileOptions)
70-
71-
72- # Option 2: Output filename to stdout
73- else
74- filename = options .filename || (" #{ options .directory || ' /tmp' } /html-pdf-#{ sys .pid } -#{ size} .#{ fileOptions .type } " )
75- page .render (filename, fileOptions)
76- sys .stdout .write (filename)
71+ # Option 2: Output filename to stdout
72+ else
73+ filename = options .filename || (" #{ options .directory || ' /tmp' } /html-pdf-#{ sys .pid } -#{ size} .#{ fileOptions .type } " )
74+ page .render (filename, fileOptions)
75+ sys .stdout .write (filename)
7776
7877
79- phantom .exit (0 )
78+ phantom .exit (0 )
Original file line number Diff line number Diff line change 11{
22 "name" : " html-pdf" ,
3- "version" : " 0.1.3 " ,
3+ "version" : " 0.2.0 " ,
44 "description" : " HTML to PDF converter that uses phantomjs" ,
55 "main" : " index.js" ,
66 "directories" : {
Original file line number Diff line number Diff line change 2222 }
2323
2424 .group {
25- margin-top : 6 mm ;
25+ margin-top : 3 mm ;
2626 }
2727
2828 .line {
2929 color : white;
3030 position : relative;
3131 }
32+
33+ .ghost {
34+ position : relative;
35+ text-align : center;
36+ -webkit-transform : scale (0.6 );
37+ }
38+
39+ .ghost .body {
40+ z-index : 1 ;
41+ position : relative;
42+ height : 176px ;
43+ width : 125px ;
44+ }
45+
46+ .ghost .eyes {
47+ z-index : 10 ;
48+ position : absolute;
49+ left : 50% ;
50+ margin-left : -22px ;
51+ top : 25% ;
52+ width : 44px ;
53+ height : 25px ;
54+ background : url ('http://static.suitart.com/templates/eyes.gif' );
55+ }
56+
3257 </ style >
3358 </ head >
3459 < body >
3560 < div class ="bottom ">
61+ < div class ="ghost ">
62+ < div class ="eyes "> </ div >
63+ < img class ="body " src ="http://static.suitart.com/templates/ghost.png ">
64+ </ div >
3665 < div class ="line "> Marc Bachmann</ div >
3766 < div class ="line "> cto</ div >
3867
You can’t perform that action at this time.
0 commit comments