Hi Elvi,

For JSPUI implementation I was including the bitstream's filename, and
forgot to add the same for xmlui's implementation.

Google says format not recognized because it doesn't know what file:
.../id/136 is, but it does know what something.pdf is.
I added a dummy value for a PDF, and it will load the file, it didn't even
have to match the real file name.
https://docs.google.com/viewer?url=http://repository.seafdec.org.ph/bitstream/id/136/blank.pdf&embedded=true

So, to get your viewer working quick-and-dirty, you could change the line:


<xsl:text>&amp;embedded=true</xsl:text>

to


<xsl:text>/something.pdf&amp;embedded=true</xsl:text>


And it would work.

However, for a normal system, you should use some xsl to use the real
filename, and properly url-encode it to remove spaces and such.


Peter Dietz



On Wed, Jun 1, 2011 at 10:44 PM, Nemiz, Elvi S. <esne...@seafdec.org.ph>wrote:

> Hello Peter,
>
> I followed your instructions in
> https://wiki.duraspace.org/display/DSPACE/Document+Preview+with+Google+Docs+viewer.
> Pdf links are working when I tested it on http://docs.google.com/viewer.
> Is it normal that the file name is not included? Maybe my urls were
> improperly encoded? or how can I include file name. I checked that the
> bitstream ID was grabbed properly. In our repository for example,
> http://repository.seafdec.org.ph/handle/123456789/38, the preview link
> points to
> http://docs.google.com/viewer?url=http://repository.seafdec.org.ph/bitstream/id/136&embedded=trueand
>  it says "Sorry, this type of document is not supported for viewing". The
> link to the bitstream is working properly when viewed at google docs:
> http://docs.google.com/viewer?url=http://repository.seafdec.org.ph/bitstream/id/136/adsea91p024-031.pdf.
> The only difference that I can see is that the filename is not included in
> the url in our dspace instance. Please help. Thanks and regards.
> --
> Sincerely,
> Elvi S. Nemiz
> Information Assistant
> Library and Data Bank Services Section
> Training and Information Division
> SEAFDEC Aquaculture Department
> Tigbauan, Iloilo
> Philippines
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to