Download the PHP package netflex/renderer without Composer

On this page you can find all versions of the php package netflex/renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package renderer

Netflex Renderer

Stable version Build status License: MIT Contributors Downloads

[READ ONLY] Subtree split of the Netflex Renderer component (see netflex/framework)

This package provides a high-level builder interface for generating PDF's, images, and server side rendering of HTML.

Full API reference is available here.

Table of contents

Installation

Usage

Generating PDF/JPG/PNG/HTML

These methods also applies to the HTML, PNG, and JPG classes.

From raw HTML

By rendering a View

By rendering a named Route

By rendering a URL

Setting pixel ratio

These methods also applies to the PNG, and JPG classes.

Specifying a timeout

Sometimes the document can take a while to load. You can specify how long you want to wait until the request is considered timed out.

These methods also applies to the HTML, PNG, and JPG classes.

Waiting for the document to load

If your document is client side rendered with JavaScript, you sometimes have to wait a bit before the document is captured. Otherwise you risk getting a blank or partial blank result.

These methods also applies to the HTML, PNG, and JPG classes.

Retrieving the rendered content

These methods also applies to the HTML, PNG, and JPG classes.

All the renderers implements Laravel's Responsable interface. This means that you can return them directly from you Route or Controller, and they will automatically be converted to a Response.

PDF

Specify page ranges

Print background

Margings

Paper format

Document scaling

Explicit size

Landscape mode

Set size from CSS

Setting custom header and footer

You can override the default header and footer by providing your own view.

Do note that if you specify a custom template for the header, and don't provide a custom template for the footer, the default footer will show. This also applies the other way around. This is a limitation of the render backend.

Outputting page numbers etc.

If you do specify a custom header or footer view, you can use the following Blade directives.

Page break utilities

Tags and metadata

You can set PDF tags and metadata.

Images

Setting viewport size

The default viewport is 1920x1080 at 1x devicePixelRatio.

These options are shared between JPG and PNG

Capturing a specific element use a CSS selector

Notice: Only the first matched element will be captured.

Clip

Notice: Clipping is always relative to the full document, even when using a selector to target an element. This is a backend limitation, and could change in the future.

Full page

If you want to capture the entire page, including content not visible in the viewport.

JPG

Quality

PNG

Transparent

Preserves background opacities.

HTML

The HTML renderer can be used for getting rendered content as HTML. This can be very useful if parts of your view/url is rendered client side with JavaScript.

Server Side Rendering (SSR)

This package provides a middleware that you can use to server side render your content.

Netflex\Render\Http\Middleware\SSR

Just register that in you app/Http/Kernel.php file

And now you can use it in a route:

MJML

The MJML rendered is used to transform MJML to HTML. MJML is a framework for generating responsive email markup.

The MJML renderer isn't very usefull standalone, but provides a few helpers that can hook into Mailable.

Example:

Usage in Mailable

Instead of using a .blade.php file, write your view as a .mjml file.

In your Mailable class, add the trait Netflex\Render\Mail\MJML.

Example:

The resulting rendered markup will be cached until the source .mjml file changes. But variables passed to the view will still be injected dynamically.

View macros

This package registers a few macros to the View class for your convenience.


Licensed under the MIT license.

Copyright Apility AS © 2021


All versions of renderer with dependencies

PHP Build Version
Package Version
Requires facade/ignition Version ^2.0
illuminate/contracts Version ^8.0
illuminate/http Version ^8.0
illuminate/support Version ^8.0
illuminate/view Version ^8.0
netflex/api Version ^4.33
php Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netflex/renderer contains the following files

Loading the files please wait ....