Browsershot wrapper for Laravel 5

Overview

Browsershot wrapper for Laravel 5

This package takes advantage of Google Chrome's Headless mode to take screenshots and generate PDFs from websites, views and raw html

Build Status Coverage Status Latest Stable Version Latest Unstable Version Total Downloads License

Requirements

You can install Puppeteer in your project via NPM:

npm install puppeteer

Or you could opt to just install it globally

npm install puppeteer --global

On a Forge provisioned Ubuntu 16.04 server you can install the latest stable version of Chrome like this:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
sudo npm install --global --unsafe-perm puppeteer
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium

Installation

Install the package through composer

composer require verumconsilium/laravel-browsershot

After the package is installed the service provider will be automatically discovered and two new Facades PDF and Screenshot will be available

Usage

The recommended way to use this package is through its Facades

PDF

Generating a PDF from a view and returning it inline

  
  use VerumConsilium\Browsershot\Facades\PDF;
  
  ...
  
  return PDF::loadView('view.name', $data)
            ->inline();
  

You can chain all the methods available in the browsershot master library

Returning the PDF as a download

  use VerumConsilium\Browsershot\Facades\PDF;
  
  ...
  
  return PDF::loadView('view.name', $data)
            ->margins(20, 0, 0, 20)
            ->download();

You can pass the custom file name and additional headers the response will have to the inline and download methods like

  PDF::loadHtml('

Awesome PDF

'
) ->download('myawesomepdf.pdf', [ 'Authorization' => 'token' ]);

Persisting PDF to disk

If you would like to save the generated pdf file to your storage disk you can call the store or storeAs method

  $pdfStoredPath = PDF::loadUrl('https://google.com')
                      ->store('pdfs/')

This will use the default storage driver to store the pdf in the pdfs/ folder giving it a unique name. If you would like to specify the name you can call de storeAs method

  $pdfStoredPath = PDF::loadUrl('https://google.com')
                      ->storeAs('pdfs/', 'google.pdf')

Screenshots

Screenshots are created the same way as PDFs just change the facade to Screenshot

Generating screenshots as JPG/JPEG

By default screenshots will be taken as PNG format if you would like to use JPG instead call the useJPG() method

use VerumConsilium\Browsershot\Facades\Screenshot;

Screenshot::loadView('view.name', $data)
           ->useJPG()
           ->margins(20, 0, 0, 20)
           ->download();
Comments
  • Chained methods being ignored

    Chained methods being ignored

    My current return statement:

    return PDF::loadView('pdfs.cert2', array('certificate' => $certificate))->inline($file_name);
    

    works just fine. But chaining any methods from spatie's library before ->inline() seem to be ignored. Chaining them after results in method does not exist errors.

    Any idea what I may be doing wrong?

    bug question 
    opened by jrmypttrsn 6
  • using storeAs throwing  error after recent update

    using storeAs throwing error after recent update

    We updated packages using <composer update) and browsershot showing error if we use storeAs option ....

    Undefined index: screenshot-filename.jpg

    from this file and section : /vendor/league/flysystem/src/Adapter/Local.php line 350: $success = chmod($location, $this->permissionMap[$type][$visibility]);

    this is our test code which was working before this update:

    Screenshot::loadUrl($url)
    	->windowSize(1024, 850)
             ->useJPG()
    	->storeAs('public/',"screenshot-filename.jpg");
    

    it actually taking screen shot but saving in another name and as png !

    this is the ourput file: ROCZJfQGkiXoeNrp7iA9W9xg7mSGRzDqs70NITJW.png

    opened by artin 4
  • Method VerumConsilium\Browsershot\Screenshot::fit() does not exists

    Method VerumConsilium\Browsershot\Screenshot::fit() does not exists

    It looks like the fit method is not chained:

        return \VerumConsilium\Browsershot\Facades\Screenshot::loadUrl('https://example.com')
        ->windowSize(1920, 1080)
        ->fit('contain', 200, 200)
        ->download();
    

    This returns:

    BadMethodCallException
    Method VerumConsilium\Browsershot\Screenshot::fit() does not exists
    
    opened by Binternet 3
  • Reproducing output from first iteration when used in loop or Laravel queue job

    Reproducing output from first iteration when used in loop or Laravel queue job

    It seems there are issues when laravel-browsershot is used from a queue job or loop. The behavior here seems to be that it caches whatever Html you load, then generates the same pdf or screenshot as done on the first iteration.

    I first suspected spatie/browsershot or Puppeteer to be the reason, but using spatie's Browsershot directly doesn't show the same behavior. Original report issued here https://github.com/spatie/browsershot/issues/197

    opened by satyago 3
  • waitForFunction chain throws an error

    waitForFunction chain throws an error

    I get this error : "Method VerumConsilium\Browsershot\PDF::waitForFunction() does not exists", when I ca;; waitForFunction along with other functions.

    You have written that all of the chains of Browsershot would work fine, but this one doesn't

    opened by tfolio-vimal 2
  • Bump spatie/browsershot from 3.26.0 to 3.57.3

    Bump spatie/browsershot from 3.26.0 to 3.57.3

    Bumps spatie/browsershot from 3.26.0 to 3.57.3.

    Release notes

    Sourced from spatie/browsershot's releases.

    3.57.3

    • Do not allow file:// to be used

    3.57.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.1...3.57.2

    3.57.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.0...3.57.1

    3.57.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.56.0...3.57.0

    3.56.0

    • add failedRequests method

    3.55.0

    What's Changed

    Full Changelog: https://github.com/spatie/browsershot/compare/3.54.0...3.55.0

    3.54.0

    What's Changed

    Full Changelog: https://github.com/spatie/browsershot/compare/3.53.0...3.54.0

    3.53.0

    What's Changed

    ... (truncated)

    Changelog

    Sourced from spatie/browsershot's changelog.

    3.57.3 - 2022-10-25

    • Do not allow file:// to be used

    3.57.2 - 2022-08-19

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.1...3.57.2

    3.57.1 - 2022-08-03

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.0...3.57.1

    3.57.0 - 2022-06-28

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.56.0...3.57.0

    3.56.0 - 2022-06-21

    • add failedRequests method

    3.55.0 - 2022-06-13

    What's Changed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Destructuring assignment not working when downloading PDF

    Destructuring assignment not working when downloading PDF

    Version info:

    • Node 10.16.0
    • Puppeteer 4.0.0
    • Laravel 6.18.20

    I am trying to download a PDF using the following:

    return PDF::loadHtml($html)->download($filename);
    

    When I do this, I get the following error:

    [2020-06-19 17:52:02] local.ERROR: The command "PATH=$PATH:/usr/local/bin NODE_PATH=`npm root -g` node '/home/code/laravel/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:\/\/\/tmp\/1176757848-0907304001592589121\/index.html","action":"pdf","options":{"path":"\/tmp\/594410754-0907194001592589121\/BrowsershotOutput1592589121G9jfs.pdf","args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false}}'" failed.
    
    Exit Code: 8(Unknown error)
    
    Working directory: /home/code/laravel/public
    
    Output:
    ================
    
    
    Error Output:
    ================
    
    /home/code/laravel/vendor/spatie/browsershot/bin/browser.js:6
    const [, , ...args] = process.argv;
          ^
    SyntaxError: Unexpected token [
        at Module._compile (module.js:439:25)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Function.Module.runMain (module.js:497:10)
        at startup (node.js:119:16)
        at node.js:929:3
     {"userId":39767,"exception":"[object] (Symfony\\Component\\Process\\Exception\\ProcessFailedException(code: 0): The command \"PATH=$PATH:/usr/local/bin NODE_PATH=`npm root -g` node '/home/code/laravel/vendor/spatie/browsershot/src/../bin/browser.js' '{\"url\":\"file:\\/\\/\\/tmp\\/1176757848-0907304001592589121\\/index.html\",\"action\":\"pdf\",\"options\":{\"path\":\"\\/tmp\\/594410754-0907194001592589121\\/BrowsershotOutput1592589121G9jfs.pdf\",\"args\":[],\"viewport\":{\"width\":800,\"height\":600},\"displayHeaderFooter\":false}}'\" failed.
    
    Exit Code: 8(Unknown error)
    

    This seems to indicate that destructuring assignment is not supported (which I think is new with ES6), but I have the minimum requirements and don't see what else I could be doing wrong. Any help with this?

    opened by sschilli 1
  • Bump symfony/http-foundation from 4.1.6 to 4.4.1

    Bump symfony/http-foundation from 4.1.6 to 4.4.1

    Bumps symfony/http-foundation from 4.1.6 to 4.4.1.

    Changelog

    Sourced from symfony/http-foundation's changelog.

    CHANGELOG

    5.1.0

    • Deprecate Response::create(), JsonResponse::create(), RedirectResponse::create(), and StreamedResponse::create() methods (use __construct() instead)

    5.0.0

    • made Cookie auto-secure and lax by default
    • removed classes in the MimeType namespace, use the Symfony Mime component instead
    • removed method UploadedFile::getClientSize() and the related constructor argument
    • made Request::getSession() throw if the session has not been set before
    • removed Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL
    • passing a null url when instantiating a RedirectResponse is not allowed

    4.4.0

    • passing arguments to Request::isMethodSafe() is deprecated.
    • ApacheRequest is deprecated, use the Request class instead.
    • passing a third argument to HeaderBag::get() is deprecated, use method all() instead
    • [BC BREAK] PdoSessionHandler with MySQL changed the type of the lifetime column, make sure to run ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL to update your database.
    • PdoSessionHandler now precalculates the expiry timestamp in the lifetime column, make sure to run CREATE INDEX EXPIRY ON sessions (sess_lifetime) to update your database to speed up garbage collection of expired sessions.
    • added SessionHandlerFactory to create session handlers with a DSN
    • added IpUtils::anonymize() to help with GDPR compliance.

    4.3.0

    • added PHPUnit constraints: RequestAttributeValueSame, ResponseCookieValueSame, ResponseHasCookie, ResponseHasHeader, ResponseHeaderSame, ResponseIsRedirected, ResponseIsSuccessful, and ResponseStatusCodeSame
    • deprecated MimeTypeGuesserInterface and ExtensionGuesserInterface in favor of Symfony\Component\Mime\MimeTypesInterface.
    • deprecated MimeType and MimeTypeExtensionGuesser in favor of Symfony\Component\Mime\MimeTypes.
    • deprecated FileBinaryMimeTypeGuesser in favor of Symfony\Component\Mime\FileBinaryMimeTypeGuesser.
    • deprecated FileinfoMimeTypeGuesser in favor of Symfony\Component\Mime\FileinfoMimeTypeGuesser.
    • added UrlHelper that allows to get an absolute URL and a relative path for a given path

    4.2.0

    • the default value of the "$secure" and "$samesite" arguments of Cookie's constructor
    ... (truncated)
    Commits
    • 8bccc59 Merge branch '4.3' into 4.4
    • fcafc7c Merge branch '3.4' into 4.3
    • d2d0cfe [HttpFoundation] Fixed typo
    • cc09809 [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4
    • c2480b7 Merge branch '3.4' into 4.3
    • f7efd0b Simpler example for Apache basic auth workaround
    • 502040d Merge branch '4.3' into 4.4
    • 0ac9ebf Merge branch '3.4' into 4.3
    • a558b18 feature #34405 [HttpFoundation] Added possibility to configure expiration tim...
    • 0c5217a [HttpFoundation] Added possibility to configure expiration time in redis sess...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • AWS EBS : ProcessFailedException

    AWS EBS : ProcessFailedException

    I'm getting this error

    """ The command "PATH=$PATH:/usr/local/bin NODE_PATH=/usr/local/bin/node /usr/local/bin/npm root -g /usr/local/bin/node '/var/app/current/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:///tmp/1163077786-0396427001571837477/index.html","action":"pdf","options":{"path":"/tmp/BrowsershotOutputgbSCqT.pdf","args":["--no-sandbox"],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"margin":{"top":"0mm","right":"0mm","bottom":"0mm","left":"0mm"}}}'" failed. ◀

    Exit Code: 1(General error)

    Working directory: /var/app/current/public

    Output: Error Output: /var/app/current/vendor/spatie/browsershot/bin/browser.js:5 const [, , ...args] = process.argv; ^ SyntaxError: Unexpected token [ at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 """

    any help would be appreciated.

    node -v = v0.12.2 npm -v = 2.7.4

    opened by dhwlm 1
  • "Method VerumConsilium\Browsershot\PDF::SetTitle() does not exists"

    Laravel: 5.6.38 Voyager: v1.0.11 PHP: 7.2.2 Database: Mysql 10.1.30

    I've been trying to integrate browser-shot into laravel voyager and I really don't know how I would do this. I have little knowledge about facades, node.js and puppeteer. As of now, I've successfully downloaded browsershot to my laravel project, using composer require verumconsilium/laravel-browsershot.

    I've also installed puppeteer in my project folder using npm install puppeteer. In my Controller, Here are some of the contents of my Controller:

    margins(20, 0, 0, 20) ->download(); } ... } ?>

    I've also downloaded the files from this repository to my project folder(but not all). What am I missing?

    P.S. I am deeply sorry for those inconvenienced by my little knowledge about this things. Please understand me.

    good first issue 
    opened by jasonxsiervo 1
  • make browsershot getter public for more flexibility

    make browsershot getter public for more flexibility

    I ran into the situation where I need the retrieved HTML as well for a Screenshot request.

    When I have something like the following example I can't get the bodyHtml value of browsershot:

    $request = Screenshot::loadUrl($url);
    $request->windowSize(1920, 1080)
                    ->storeAs('public/screenshots', $filename);
    
    $html = $request->bodyHtml();
    

    This is because $this is returned for forwarded calls which is fine for the most cases: https://github.com/verumconsilium/laravel-browsershot/blob/master/src/Wrapper.php#L150

    For more flexibility I've made the getter browsershot() public to be able to retrieve the html like this:

    $request = Screenshot::loadUrl($url);
    $request->windowSize(1920, 1080)
                    ->storeAs('public/screenshots', $filename);
    
    $html = $request->browsershot()->bodyHtml();
    

    More calls where the return value of the function called on browsershot is needed are now possible as well.

    opened by okaufmann 0
  • Bump spatie/browsershot from 3.26.0 to 3.57.4

    Bump spatie/browsershot from 3.26.0 to 3.57.4

    Bumps spatie/browsershot from 3.26.0 to 3.57.4.

    Release notes

    Sourced from spatie/browsershot's releases.

    3.57.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.3...3.57.4

    3.57.3

    • Do not allow file:// to be used

    3.57.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.1...3.57.2

    3.57.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.0...3.57.1

    3.57.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.56.0...3.57.0

    3.56.0

    • add failedRequests method

    3.55.0

    What's Changed

    Full Changelog: https://github.com/spatie/browsershot/compare/3.54.0...3.55.0

    3.54.0

    ... (truncated)

    Changelog

    Sourced from spatie/browsershot's changelog.

    3.57.4 - 2022-11-21

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.3...3.57.4

    3.57.3 - 2022-10-25

    • Do not allow file:// to be used

    3.57.2 - 2022-08-19

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.1...3.57.2

    3.57.1 - 2022-08-03

    What's Changed

    New Contributors

    Full Changelog: https://github.com/spatie/browsershot/compare/3.57.0...3.57.1

    3.57.0 - 2022-06-28

    What's Changed

    New Contributors

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump guzzlehttp/psr7 from 1.4.2 to 1.8.5

    Bump guzzlehttp/psr7 from 1.4.2 to 1.8.5

    Bumps guzzlehttp/psr7 from 1.4.2 to 1.8.5.

    Release notes

    Sourced from guzzlehttp/psr7's releases.

    1.8.5

    See change log for changes.

    1.8.4

    See change log for changes.

    1.8.3

    See change log for changes.

    1.8.2

    See change log for changes.

    1.8.1

    See change log for changes.

    1.8.0

    See change log for changes.

    1.7.0

    See change log for changes.

    Revert PSR-7 type assertions

    1.6.0 introduced a few type assertions to enforce types defined by PSR-7. Unfortunately that break the library for users not strictly following the PSR-7 standard. Since the users impacted by this change seems to be rather large, this hotfix reverts that change with the note that we will reapply it in 2.0.0, so fixing this is recommended regardless of which version you use.

    Details are in #282 and #283

    1.6.0

    Version 1.6.0 is released which will likely be the last minor release in 1.x. We're focussing 2.0 now with support for psr/http-factory, PHP 7.2 requirement and type declarations.

    Added

    • Allowed version ^3.0 of ralouphie/getallheaders dependency (#244)
    • Added MIME type for WEBP image format (#246)
    • Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)

    Changed

    • Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
    • Accept port number 0 to be valid (#270)

    Fixed

    • Fixed subsequent reads from php://input in ServerRequest (#247)
    • Fixed readable/writable detection for certain stream modes (#248)
    • Fixed encoding of special characters in the userInfo component of an URI (#253)

    1.5.0

    After a really long waiting period, 1.5.0 is finally here with the following changes:

    Added

    ... (truncated)

    Changelog

    Sourced from guzzlehttp/psr7's changelog.

    1.8.5 - 2022-03-20

    Fixed

    • Correct header value validation

    1.8.4 - 2022-03-20

    Fixed

    • Validate header values properly

    1.8.3 - 2021-10-05

    Fixed

    • Return null in caching stream size if remote size is null

    1.8.2 - 2021-04-26

    Fixed

    • Handle possibly unset url in stream_get_meta_data

    1.8.1 - 2021-03-21

    Fixed

    • Issue parsing IPv6 URLs
    • Issue modifying ServerRequest lost all its attributes

    1.8.0 - 2021-03-21

    Added

    • Locale independent URL parsing
    • Most classes got a @final annotation to prepare for 2.0

    Fixed

    • Issue when creating stream from php://input and curl-ext is not installed
    • Broken Utils::tryFopen() on PHP 8

    1.7.0 - 2020-09-30

    Added

    • Replaced functions by static methods

    Fixed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump league/flysystem from 1.0.48 to 1.1.4

    Bump league/flysystem from 1.0.48 to 1.1.4

    Bumps league/flysystem from 1.0.48 to 1.1.4.

    Release notes

    Sourced from league/flysystem's releases.

    1.0.62

    When resources are not actually file pointers, but fopen results from URL, the fstat call fails. This resulted in an error in PHP 7.4 because it's more strict about variable handling. This affected the Util::getStreamSize utility method.

    Commits
    • f3ad691 Reject paths with funky whitespace.
    • 1ac14e9 Added SharePoint community adapter
    • 4347fe7 Remove ext-fileinfo from suggests, it's already in requires
    • 1bf07fc Fix time-related tests failing in 2021
    • 13352d2 Remove @​deprecated MountManager
    • 2062a94 Adding AsyncAWS under community support
    • 53f16fd More precise signatures
    • 2323c98 Add missing emptyDir annotation
    • 9be3b16 Pre-release changelog
    • f66f0e5 Prevent passing invalid resources.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Failed to launch the browser process!

    Failed to launch the browser process!

    I am trying to create and download a PDF from HTML

    return PDF::loadView('pdf.certificates.default', $data)
                ->download();
    

    however, I am getting the following error

    Error: Failed to launch the browser process! spawn /usr/bin/chromium ENOENT
    

    I am using devilbox as my development environment

    I tried adding the following to my .env file and still, get the error

    BROWSERSHOT_CHROME=/usr/bin/chromium

    opened by MikePageDev 0
  • pdf not chnaging

    pdf not chnaging

    i have a for loop (3) creating pdf from PDF::loadview with different data and iam sending each pdf to each user emails but pdf is not changing all 3 users get same pdf as first ones

    opened by NatBLida68 0
  • anyone get ApexCharts to render in PDF? i get blank

    anyone get ApexCharts to render in PDF? i get blank

    Anyone get ApexCharts to render in PDF? In a regular view, the chart renders fine, but in a PDF I get blank.

    Thanks.


    Separately, narrowed down an issue that had me going at first.

    Blade template tags in the view seem to cause issues. Using for example {{ asset('js/app.js') }} causes an error. Even though it's a bare bones view.

    Error: TimeoutError: Navigation timeout of 30000 ms exceeded

    opened by cjaoude 2
Releases(v1.1.1)
Owner
VECO
VECO
⚡️ MIRROR — A feature-rich Laravel wrapper for the WeasyPrint Document Factory.

WeasyPrint for Laravel A feature-rich Laravel wrapper for the WeasyPrint Document Factory. This package requires Laravel 8.47+ running on PHP 8+ in or

Mike Rockétt 7 Dec 30, 2022
PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage

Snappy Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopd

KNP Labs 4.1k Dec 30, 2022
PHP library allowing PDF generation or snapshot from an URL or an HTML page. Wrapper for Kozea/WeasyPrint

PhpWeasyPrint PhpWeasyPrint is a PHP library allowing PDF generation from an URL or an HTML page. It's a wrapper for WeasyPrint, a smart solution help

Pontedilana 23 Oct 28, 2022
A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface

PHP WkHtmlToPdf PHP WkHtmlToPdf provides a simple and clean interface to ease PDF and image creation with wkhtmltopdf. The wkhtmltopdf and - optionall

Michael Härtl 1.5k Dec 25, 2022
Simple wrapper package around MPDF's setProtection method that allows you to set password on PDF files

Laravel PDF Protect (fork) Simple wrapper package around MPDF's setProtection method that allows you to set password on PDF files. Installation You ca

Raphael Planer 2 Jan 23, 2022
PHP Wrapper for callas pdfToolbox

PHP Wrapper for callas pdfToolbox A PHP wrapper class for callas pdfToolbox. Installation This library is installed via Composer. To install, use comp

Alannah Kearney 0 Feb 5, 2022
Laravel Snappy PDF

Snappy PDF/Image Wrapper for Laravel 5 and Lumen 5.1 This package is a ServiceProvider for Snappy: https://github.com/KnpLabs/snappy. Wkhtmltopdf Inst

Barry vd. Heuvel 2.3k Jan 2, 2023
Adobe XDでデザインしてSVGでエクスポートしたテンプレートをもとに、A4サイズの帳票をHTMLで出力する機能のPHP(Laravel)による実装例です

svg-paper-example Adobe XDでデザインしてSVGでエクスポートしたテンプレートをもとに、A4サイズの帳票をHTMLで出力する機能のPHP(Laravel)による実装例です。 こちらで実際に動くデモが見られます ?? 実装内容についての詳細は こちらのブログ記事 で解説していま

Takashi Kanemoto 21 Dec 11, 2022
Generate PDFs in Laravel with Mpdf.

Laravel Mpdf: Using Mpdf in Laravel for generate Pdfs Easily generate PDF documents from HTML right inside of Laravel using this mpdf wrapper. Importa

Carlos Meneses 264 Jan 4, 2023
A Laravel package for creating PDF files using LaTeX

LaraTeX A laravel package to generate PDFs using LaTeX · Report Bug · Request Feature For better visualization you can find a small Demo and the HTML

Ismael Wismann 67 Dec 28, 2022
DOMPDF module for Laravel 5

pdf-laravel5 DOMPDF module for Laravel 5. Export your views as PDFs - with css support. Instalation Add: "vsmoraes/laravel-pdf": "^2.0" To your compo

Vinicius Moraes 88 Jul 25, 2022
Generate PDF invoices for your customers in laravel

What is Invoices? Invoices is a Laravel library that generates a PDF invoice for your customers. The PDF can be either downloaded or streamed in the b

Erik C. Forés 399 Jan 2, 2023
Rapidly Generate Simple Pdf, CSV, & Excel Report Package on Laravel

Laravel Report Generators (PDF, CSV & Excel) Rapidly Generate Simple Pdf Report on Laravel (Using barryvdh/laravel-dompdf or barryvdh/laravel-snappy)

Jimmy Setiawan 513 Dec 31, 2022
Laravel package to convert HTML to PDF, supporting multiple drivers.

eve/pdf-converter A Laravel package to help convert HTML to PDF. Supports multiple drivers. Requirements and Installation eve/pdf-converter requires L

eve.io 11 Feb 15, 2022
Dompdf - Simple Dompdf package for Laravel

Dompdf - Simple Dompdf package for Laravel

Jonathan Thuau 228 May 3, 2022
Ce projet vous montre comment utiliser des fonts localement dans vos applications Laravel, avec ViteJS et Tailwind CSS

Laravel - use local fonts with Tailwind CSS and Vite Ce projet est né d'un constat: vous êtes souvent nombreuses et nombreux à galérer pour utiliser d

Fred Christian 2 Sep 20, 2022
A wrapper around Spatie’s Browsershot for managing social share images (OGP, Twitter etc.)

Very short description of the package This package allows you to create dynamic social sharing images in your Laravel apps. It uses Spatie’s Browsersh

Richard Le Poidevin 4 Dec 25, 2021
Phantom Analyzer scans websites for spy pixels. It runs via Laravel Vapor using Browsershot.

Phantom Analyzer Phantom Analyzer was a tool we launched during Halloween 2020. It's a much simpler version of Blacklight by The Markup and we had so

Fathom Analytics 105 Dec 18, 2022
Run Browsershot on AWS Lambda with Sidecar for Laravel

Run Browsershot on AWS Lambda with Sidecar for Laravel This package allows you to run Browsershot on AWS Lambda through Sidecar. You won't need to ins

Stefan Zweifel 121 Dec 21, 2022
Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite

Mollie for Laravel Laravel-Mollie incorporates the Mollie API and Mollie Connect into your Laravel or Lumen project. Accepting iDEAL, Apple Pay, Banco

Mollie 289 Nov 24, 2022