2017 © Pedro Peláez
 

craft-plugin snapshot

PDF or Image generation from a Url or HTML page

image

enupal/snapshot

PDF or Image generation from a Url or HTML page

  • Saturday, July 7, 2018
  • by enupal
  • Repository
  • 1 Watchers
  • 3 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 7 Versions
  • 100 % Grown

The README.md

, (*1)

Enupal Snapshot , (*2)

Enupal Snapshot Plugin for Craft CMS

PDF or Image generation from a URL or HTML page easily. It uses the excellent webkit-based wkhtmltopdf and wkhtmltoimage available on OSX, Linux & windows., (*3)

Features

Store your PDF or Image files in Assets

Enupal Snapshot allows set a global asset and sub-path (twig code allowed) to store your files. Override the asset and sub-path before generating your files in your templates, more info here., (*4)

Display the Pdf in browser from Html

{%  set settings = {
        filename: 'my-first.pdf'
    }
%}

{{ craft.enupalsnapshot.displayHtml("

Hello world!

", settings) }}

Display the Pdf in browser from template

{%  set settings = {
        filename: 'my-first.pdf',
        variables: {
            foo: 'barr'
        }
    }
%}

{{ craft.enupalsnapshot.displayTemplate("pdf/examples/summary", settings) }}

Download url of the Pdf from Html

{%  set settings = {
        filename: 'my-first.pdf',
        inline: false,
    }
%}

{% set url = craft.enupalsnapshot.displayHtml("

Hello world!

", settings) %} <a target="_blank" href="{{url}}"> Download Pdf</a>

Download url as an Image

{%  set settings = {
        filename: 'my-first-image.png',
        asImage: true
    }
%}

{% set url = craft.enupalsnapshot.displayHtml("

Hello world!

", settings) %} <a target="_blank" href="{{url}}"> Download Image</a>

Display the Pdf in browser from Urls

{% set urls = {0: 'https://www.google.com', 1:'http://enupal.com'} %}

{%  set settings = {
        filename: 'my-first.pdf'
    }
%}

{{ craft.enupalsnapshot.displayUrl(urls, settings) }}

Add cliOptions

All available options here:, (*5)

{%  set settings = {
        filename: 'my-first.pdf',
        cliOptions: {
            'cover': '

Hello world from Enupal Snapshot

', 'header-font-size': '36', 'footer-right': null, 'orientation': 'Portrait', 'page-size': 'A4' } } %} {{ craft.enupalsnapshot.displayHtml("

Hello world!

", settings) }}

Documentation

https://docs.enupal.com/enupal-snapshot/, (*6)

Enupal Snapshot Support

  • Send us a note at: support@enupal.com, (*7)

  • Create an issue on Github, (*8)


Brought to you by enupal, (*9)

Enupal Snapshot , (*10)

The Versions

07/07 2018

dev-master

9999999-dev

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

04/04 2018

1.0.4

1.0.4.0

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

04/04 2018

dev-develop

dev-develop

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

03/04 2018

1.0.3

1.0.3.0

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

15/03 2018

1.0.2

1.0.2.0

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

15/03 2018

1.0.1

1.0.1.0

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft

25/01 2018

1.0.0

1.0.0.0

PDF or Image generation from a Url or HTML page

  Sources   Download

The Requires

 

cms image pdf snapshot craftcms craft-plugin craft