javascript - Scaling HTML page on canvas or area -


i'm generating html invoice page later gets converted a4 page pdf , showing generated pdf on canvas using pdf.js.

with lot of text performance suffers on tablets/phones. have requirement fit page on exact predefined pixel sizes. scaling pdf (or generate image pdf , scale too) easy, pdf performance isn't great , scaled image gets blurry , unclear.

right i'm thinking showing raw html - great performance , clear text, how scale it? set font sizes page fits in predefined size area? there javascript library that? tried googling, keywords 'html' , 'page' generic, results appaling.

as backup plan i'm thinking "parsing html" , using drawtext on canvas, seems quite bit of work.

any other sugesstions how scale html page in div/canvas exact width/height?

you use 2d transform if go html route. let zoom controls control scale value. controllable through javascript on div containing invoice html.

http://caniuse.com/transforms2d


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -