Yea you may be right about the PDF being more useful for end users. We can process that PDF to an image to make a nice thumbnail for the search and list views.
Good job! Erik On Thu, Apr 19, 2012 at 12:20 PM, Arno Declercq <[email protected]> wrote: > Hi, > > Yes, wkhtmltoimage uses the same kind of arguments as wkhtmltopdf, it just > delivers an image instead of a PDF. But we wanted a PDF the user could > download. Or am I missing a point? > > Wkhtmltopdf loads the widgets. I do have to add a delay to let them be > able to load but they do show up on the PDF. > >> Hey Arno, >> >> have you checked out wkhtmltoimage? It might save us a step. >> >> Also do the sakai pages execute the JS to load up the widgets? Do you >> have some screenshots we could look at? >> >> Erik >> >> On Thu, Apr 19, 2012 at 10:04 AM, Arno Declercq <[email protected]> >> wrote: >>> It works. >>> As Nicolaas said, this is exactly what we were looking for. >>> Thank you. >>> >>>> This might cross the line into full-blown crazy, but what about >>>> authenticating using curl and just nicking the session cookie?: >>>> >>>> � #!/bin/bash >>>> >>>> � # ugh. >>>> � user="$1" >>>> � pass="$2" >>>> � url="$3" >>>> � path="$4" >>>> � out="$5" >>>> >>>> � session=$(curl -s --cookie-jar - -H "Referer: ${url}/dev" \ >>>> � � � -F'sakaiauth:login=1' \ >>>> � � � -F"sakaiauth:un=$user" \ >>>> � � � -F"sakaiauth:pw=$pass" \ >>>> � � � "$url/system/sling/formlogin" 2>&1 \ >>>> � � � | grep sakai-trusted-authn | awk '{print $7}') >>>> >>>> � wkhtmltopdf-amd64 --cookie 'sakai-trusted-authn' "$session" >>>> --use-xserver --no-stop-slow-scripts --javascript-delay 5000 >>>> "${url}${path}" "$out" >>>> >>>> >>>> Running that with: >>>> >>>> � ./script.sh admin admin 'http://localhost:8080' '/' oae.pdf >>>> >>>> seems to indicate I've been successfully logged in... >>>> >>>> Cheers, >>>> >>>> Mark >>>> >>>> >>>> "Arno Declercq" <[email protected]> writes: >>>> >>>>> Erik, >>>>> Yes, I tried that already but unfortunately that doesn't seem to work. >>>>> So I'm looking for another way to set credentials. Thanks for your >>>>> reply >>>>> though. >>>>> >>>>>> Arno, >>>>>> It looks like wkhtmltopdf �supports authentication with the >>>>>> --username >>>>>> and --password flags. >>>>>> http://www.linuxcertif.com/man/1/wkhtmltopdf/ >>>>>> >>>>>> Erik >>>>>> >>>>>> On Wed, Apr 18, 2012 at 1:20 PM, Arno Declercq >>>>>> <[email protected]> >>>>>> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> I'm working on a Sakai document to PDF converter and I'm using >>>>>>> wkhtmltopdf >>>>>>> to do this. I'm running this from preview_processor.rb. It works if >>>>>>> the >>>>>>> document is public but I can't access it if it's private. >>>>>>> My question is: >>>>>>> How can I set credentials to grant wkhtmltopdf access to those >>>>>>> pages? >>>>>>> >>>>>>> Thank you in advance. >>>> >>>> -- >>>> Mark Triggs >>>> <[email protected]> >>>> >>> >>> >>> -- >>> Kind regards, >>> Arno Declercq >>> >> > > > -- > Kind regards, > Arno Declercq > _______________________________________________ oae-dev mailing list [email protected] http://collab.sakaiproject.org/mailman/listinfo/oae-dev
