On Tuesday, July 10, 2012 1:14:59 AM UTC+5:30, Julian Viereck wrote:
> Hi Viren,
>
> > example If the User click a area of say created at date the boundary of the selected area should be sent to the server
> >
> > Now I googling around I found that Pdf.js can handle the rendering of pdf in browser but can there be by any chance can I associate the event with the PDF pages as I mention below or should I look for some other solution like flash
> >
> > I hoping will get and answer for this is pdf.js group
>
> The PDF's pages are rendered each onto one HTML5 canvas element. For each of these canvas elements, you can add an event to listen for "click" events or such. That way, you can detect clicks on each individual PDF page and do something with it.
>
> In your case, you might want to listen for the "mousedown" event to get the starting position of the click and then for the "mouseup" event to get the end position. With these two positions, you can draw a rect.
>
> Best,
>
> Julian
>
> PS: Please don't use flash!
>
>
> On Monday, July 9, 2012 6:15:12 PM UTC+2, Brendan Dahl wrote:
> > Resending this message as it was accidentally discarded:
> >
> > Hello Everyone,
> > I have a scenario where I been asked to make online PDF viewer and on viewing mode the user would select certain area of the PDF and upon selection the marked area boundary w.r.s.t pdf should sent to the server.
> >
> > example If the User click a area of say created at date the boundary of the selected area should be sent to the server
> >
> > Now I googling around I found that Pdf.js can handle the rendering of pdf in browser but can there be by any chance can I associate the event with the PDF pages as I mention below or should I look for some other solution like flash
> >
> > I hoping will get and answer for this is pdf.js group
> >
> > Regards
> > Viren
Hi Julian Viereck,
Thanks a ton for the answer but is there any sample code that describe how to apply event to the pdf page that will definitely help
Regards
Viren Negi