Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion rendering first page as thumbnail
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Julian Viereck  
View profile  
 More options Oct 10 2012, 3:21 am
Newsgroups: mozilla.dev.pdf-js
From: Julian Viereck <julian.vier...@googlemail.com>
Date: Wed, 10 Oct 2012 09:21:21 +0200
Local: Wed, Oct 10 2012 3:21 am
Subject: Re: rendering first page as thumbnail
Hi priyanka,

> but it didn't work. it rendered only the first pdf under a canvas. then the rest were blank canvases.

> do you have a solution?

could you make your current code available somewhere? That would be easier for me to spot what's going wrong. Easiest might be to just put the code you have into a gist:

    https://gist.github.com/

and then send the link here again.

Best,

Julian

On Oct 6, 2012, at 6:52 PM, Priyanka M wrote:

> Hi Julian,

> I wanted something like this..

> thumbnail1  document1 name
> thumbnail2  document2 name

> like a pdf gallery.
> But with the hello world example it just renders a single pdf file in a canvas element. I couldn't do this with multiple pdfs.

> for eg. this is the architecture of the document,
> <div id = "div1">
>  foreach (urls as url) {
>    <a id = "a1" href = "url"/>
>  }
> </div>
> now how to generate a canvas for each pdf url on the same page?

> I thought I could include a canvas tag(with id = "url") within each anchor tag, and then in the js file do something like this

> $('#div1 a').each(function() {
>            var url = $('#a1').attr('href');
>            PDFJS.getDocument(url).then(function(pdf) {
>                     //rest of the code
>                     var canvas = document.getElementById(url);
>                     //remaining code
>                });
> });

> but it didn't work. it rendered only the first pdf under a canvas. then the rest were blank canvases.

> do you have a solution?

> thanks
> priyanka
> _______________________________________________
> dev-pdf-js mailing list
> dev-pdf...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-pdf-js


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.