Download the PHP package torgodly/html2media without Composer

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

🌟 Html2Media Filament Action Documentation πŸ“„

Html2Media is a powerful Laravel Filament package that allows you to generate PDFs, preview documents, and directly print content from your application. πŸš€


πŸ“Œ Overview

The Html2MediaAction provides a set of flexible actions for your Filament resources, enabling:


✨ Features


πŸ”§ Installation

To install the package, simply run the following command:

Once installed, the Html2MediaAction can be used within your Filament resources or tables.


βš™οΈ Configuration Methods

Here’s how you can customize your Html2MediaAction!

1. πŸ“‚ filename()

Set the name of the generated PDF file. ✍️

Usage:


2. πŸ“„ pagebreak()

Define page break behavior. Customize how and where page breaks occur within the document. πŸ›‘

Usage:


3. πŸ”„ orientation()

Set the page orientation for the PDF, either portrait or landscape. πŸ–ΌοΈ

Usage:


4. πŸ“ format()

Define the format of the PDF, including standard sizes like A4 or custom dimensions. πŸ“

Usage:


5. πŸ”— enableLinks()

Enable or disable automatic hyperlink conversion in the PDF. πŸ”—

Usage:


6. πŸ”§ scale()

Adjust the scaling factor for HTML to PDF conversion. πŸ”

Usage:


7. πŸ–¨οΈ print()

Enable or disable the print button in the modal. πŸ–¨οΈ

Usage:


8. πŸ‘οΈ preview()

Enable a preview option for the document content before printing or saving. πŸ‘€

Usage:


9. πŸ’Ύ savePdf()

Enable the option to directly save the content as a PDF. πŸ’Ύ

Usage:


10. βœ… requiresConfirmation()

Show a confirmation modal before performing the action. πŸ›‘

Usage:


11. πŸ’» content()

Set the content for the document. Typically, you’ll pass a Blade view for the content. πŸ“

Usage:


🎨 Example Usage

Here’s a complete example of configuring the Html2MediaAction:

This configuration will:


πŸ“Š Filament Action or Table Action

You can use the Html2MediaAction in the same way, whether it's in a Filament table action or a regular action. Simply import the appropriate class:

This makes the action flexible and usable in various contexts. 🌍


⚑ Quick Example: Direct Print or Save as PDF

  1. For direct printing:

This will directly open the print dialog for the HTML content. πŸ–¨οΈ

  1. For saving as PDF:

This will save the HTML content as a PDF. πŸ’Ύ


🏁 Conclusion

The Html2Media package for Filament makes it easy to generate PDFs, preview documents, and print content directly from your Laravel app. With flexible configuration options, you can tailor it to your specific needs, ensuring smooth document handling. ✨

We hope this documentation helps you get started quickly. πŸš€ Happy coding! πŸŽ‰


All versions of html2media with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.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 torgodly/html2media contains the following files

Loading the files please wait ....