2017 © Pedro Peláez
 

library inline-pdf-bundle

eZ Publish Bundle for displaying PDFs inline with friendly URLs

image

eab/inline-pdf-bundle

eZ Publish Bundle for displaying PDFs inline with friendly URLs

  • Monday, April 18, 2016
  • by eab
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

EabInlinePdfBundle

Summary

An eZ Publish bundle providing routing and a controller that enables inline display of PDF files with friendly URL aliases., (*1)

Copyright (C) 2015 Andy Caiger, Enterprise AB Ltd, (*2)

License

Licensed under GNU General Public License 2.0, (*3)

Features

Suppose a page http://www.example.com/Folder/File has a field that contains a binary file called My document.pdf. You can access an inline version of the PDF using http://www.example.com/Folder/File/My%20document.pdf., (*4)

You can also download it using the usual legacy module at http://www.example.com/content/download/..., (*5)

Usage

Example of generating the URL in a template:, (*6)

{% set file = content.getField( 'file' ) %}
<a href="{{ path( location ) ~ '/' ~ file.value.fileName | escape( 'url' ) }}">
    <button class="btn btn-default btn-lg" type="button">View</button>
</a>

Install

  1. Download the bundle to src/Eab/InlinePdfBundle or use composer:, (*7)

    composer require --update-no-dev --prefer-dist eab/inline-pdf-bundle
  2. Edit registerBundles() in ezpublish/EzPublishKernel.php and add the following:, (*8)

    new Eab\InlinePdfBundle\EabInlinePdfBundle(),
  3. Add the following to ezpublish/config/routing.yml:, (*9)

    eab_inlinepdf:
        resource: "@EabInlinePdfBundle/Resources/config/routing.yml"

Caveat

There is no support for external file storage. The file is assumed to be stored in the eZ Publish legacy file tree., (*10)

The Versions

18/04 2016

dev-master

9999999-dev

eZ Publish Bundle for displaying PDFs inline with friendly URLs

  Sources   Download

GPL-2.0

The Requires

 

18/04 2016

0.2

0.2.0.0

eZ Publish Bundle for displaying PDFs inline with friendly URLs

  Sources   Download

GPL-2.0

The Requires

 

07/10 2015

0.1

0.1.0.0

eZ Publish Bundle for displaying PDFs inline with friendly URLs

  Sources   Download

GPL-2.0

The Requires