Download the PHP package bymayo/pdf-transform without Composer

On this page you can find all versions of the php package bymayo/pdf-transform. 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 pdf-transform

PDF Transform for Craft CMS 5

PDF Transform is a Craft CMS plugin that transforms a PDF stored in Assets, to an image. This can then be output via Twig in to a template.

A use case for this is to show the preview of a PDF before a user downloads that particular file.

Features

Install

You can also install the plugin via the Plugin Store in the Craft Admin CP by searching for PDF Transform.

Requirements

Configuration

Setting Default Description
Page Number 1 Set with page should in the PDF should be converted to an image.
Image Volume null Choose where converted images should be stored.
Image Resolution 72 Set the resolution of the converted image.
Image Format jpg Set the file format of the converted image.
Image Quality 100 Set the image quality of the converted image.

Templating

To transform a PDF to an image use the following Twig tag:

The transformed PDF (Now an image stored in Assets) can then be output using {{ transformedPdf.one().url }}. Or get any Asset property e.g. title, id, filename etc.

If the transformed image doesn't exist then the PDF will be transformed via the template. This may cause the template/page to become slow whilst the PDF is transformed.

Be aware that this also may output a large image, so we'd recommend running this through an image transform. See Dimensions.

Known Issues

Imagick / Ghostscript

The plugin runs PDFs through a PDF library called pdf-to-image. They have known issues with Imagick where transforms may fail if Ghost Script isn't accessible through Imagick (Very easily resolvable)

Read more about this issue - https://github.com/spatie/pdf-to-image#issues-regarding-ghostscript.

Dimensions

PDF Transform does the basic job of converting your PDF to a single image. It will never be it's role to set width and height dimensions (Other than Image Resolution).

I'd recommend running the PDF image through one of the following options/plugins and setting the dimensions that way (Some of these also handle caching the image as well)

Support

If you have any issues (Surely not!) then I'll aim to reply to these as soon as possible. If it's a site-breaking-oh-no-what-has-happened moment, then hit me up on the Craft CMS Discord - @bymayo

Roadmap


All versions of pdf-transform with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0
spatie/pdf-to-image Version ^2.0
spatie/pdf-to-text Version ^1.54
donatello-za/rake-php-plus Version ^1.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 bymayo/pdf-transform contains the following files

Loading the files please wait ....