presently working on project in have generate pdf webpage contains special symbols well. generating using phantomjs(version 1.9.8). have applied following algorithm on web page.
var heighttracker = 0; var max_a4_page_height=842pt; // size of a4 page 842 points every_division on page var temp_height=read_height_of_division(); // give's height in pixels temp_height*=(72/96); // converting pixels points heighttracker+=temp_height; if( heighttracker>= max_a4_page_height) { insert_page_break_before_this_division(); heighttracker=temp_height; // initial height of new page } the problem facing in many cases showing blank pages , if reduce a4 page height division element broken 2 pages , got blank space after that.
i have done experiments on above problem , know height of division on web page different height of division on pdf i.e. in many cases height compressed factor.
is having idea why happening , how can out problem.
the current pdf 72 dpi. tried 120 dpi no suitabe changes found. in pdf printed height of each division , cumulative height of page. , here pdf.
i've built related setup phantomjs , sounds printed output not have correct css.
test out printed content looks in chrome (or likewise) first, , when content works, phantomjs should able reproduce it.
Comments
Post a Comment