eZ Community » Forums » Developer » Help with pdfs
expandshrink

Help with pdfs

Help with pdfs

Wednesday 08 May 2013 3:33:40 pm - 5 replies

regards
I'm trying to read a pdf online.
for this attempt to read it using this code:

 <a href={concat("content/pdf/view/full/",
                        $:item.object.id,
                        "/",
                        $:item.object.data_map.file.id,
                        "/file/",
                        $:item.object.data_map.file.content.original_filename)|ezurl}>
                        {$:item.object.name|wash( xhtml )}</a>

loads the default pdf viewer in my case firefox browser, but not seen the original pdf office with binary files class. instead I created an export file pdf ez publish any ideas please.

Wednesday 08 May 2013 8:07:36 pm

I think what you're saying is that you want the PDF to download instead of displaying the the browser? This means you need to adjust the Content-Disposition HTML Header, but for modern browsers an even easier way is to add the 'download' attribute to the A tag: 

download="{$:item.object.data_map.file.content.original_filename}"

Modified on Wednesday 08 May 2013 8:08:42 pm by Joe Kepley

Wednesday 08 May 2013 10:02:44 pm

Thanks for the reply.

I want the PDF to be displayed online.

Wednesday 08 May 2013 10:10:43 pm

Thanks for the reply.

I want the PDF to be displayed online.

Tuesday 21 May 2013 6:11:24 am

The reply has been removed because of violation of forum rules.

Thursday 02 January 2014 7:27:15 am

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from