Giter VIP home page Giter VIP logo

rasterizebundle's Introduction

rasterizebundle's People

Contributors

alexander-schranz avatar bitdeli-chef avatar ivan-perez avatar markitosgv avatar padam87 avatar ricohumme avatar tomadam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rasterizebundle's Issues

BC Break in 4.1.0

This commit (a63df2a) introduces a BC break when used with Symfony 3.4. An exception is thrown during container compilation:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "getRootNode" of class "Symfony\Component\Config\Definition\Builder\TreeBuilder". in vendor/padam87/rasterize-bundle/DependencyInjection/Configuration.php:18

Treebuilder::getRootNode() does not exist in 3.4 versions of Symfony. This lead me to notice that there are no composer dependencies for symfony/config, symfony/dependency-injection or symfony/http-kernel, all of which are used within the bundle.

I suggest one of two paths:

  1. Roll back the change and release a patch version. Reapply, add a minimum Symfony version of 4 on the above dependencies and release a new major version of the bundle.

  2. Add a patch that only uses getRootNode if it is available, add dependencies on the above components and release a patch version.

I'm happy to put together a PR for these or other approach, let me know what you think.

Error when using phantomjs behind SSL certificate

This is for an update in the documentation:
When working behind a certificate you need some additional parameters for phantomjs.
This worked in my situation. By default PhantomJS sets the ssl-protocol to sslv3

padam87_rasterize:
    phantomjs:
        options:
            --ssl-protocol: tlsv1
            --ignore-ssl-errors: true

Pdf always empty

Hello, i used this bundle 2 year ago with phantomjs (and temp files, version 1.x) and it was working well. Thanks to the author ;)

I use it now in a new project with the last version and puppeteer.

But it's not working for me, the PDF is always empty.

The process output is empty, i tried to pass a simple string (not a twig render) in the rasterize method and it's not working too.

Maybe i'm doing something wrong ? I can provide informations if needed, i don't know what to do to precise the bug.

Thanks !!

NODE_PATH for global puppeteer

Hi,

First of all, nice bundle!

I've got a problem, I want to use puppeteer as a global node dependency, for my goal I need to set NODE_PATH as environment variable for Symfony process in Rasterize.php

After line 27 in Rasterizer.php:

        $process->setEnv([
            'NODE_PATH' => '/usr/local/lib/node_modules',
        ]);

Do you think it's possible to extend your bundle for passing environment variables to the process?

Orientation of PDF

Hi,

The orientation is statically set to the rasterize.js
How am I able to configure this with options to set this to landscape when needed?
I'd expect something like portrait by default in the config and set this to landscape if needed.

Can this by adjusted?

error when getting pdf.

For the bundle to work I have to comment out line 106 in Rasterizer.php
// unlink($output);
otherwise the pdf is removed from the temp directory before it can be downloaded.
Any suggestions to why I need to do that?

Thanks for your help.

Bug? or something else in the bundle

HI.
I use this bundle on a site with https. In my config I have set these options
--ssl-protocol: tlsv1
--ssl-certificates-path: /path/to/certificate/
--ignore-ssl-errors: true

When I try to get the pdf I get an error "ContextErrorException: Warning: file_get_contents..."
When I in the bundles ConfigHelper.php change line 220 from
$options[] = sprintf('%s="%s"', $name, $value);
to
$options[] = sprintf('%s=%s', $name, $value);
without the quotes on %s it works as expected.

For me it looks like an error in the bundle but maybe I am missing something.
Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.