javascript - Use a Canvas to select a portion of a pdf document -


i have request select portion of pdf document , save/email generated image in asp.net website. initial thought load pdf document , utilize draggable/resizable canvas select portion of document , save out. know how accomplish or know of alternative method of doing this.

i visualize draggable/resizable box can move around multipage document , select save portion of it.

i suggest looking @ mozilla's pdf.js project. renders pdfs canvas you. can capture section want mouse, , copy out image data:

var context = canvas.getcontext("2d"); var image = context.getimagedata(x, y, width, height); 

in order mouse positions inside of canvas, checkout thess questions: getting mouse position javascript within canvas , draw on html5 canvas using mouse


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -