Download the PHP package wappla/laravel-markdown-to-pdf without Composer
On this page you can find all versions of the php package wappla/laravel-markdown-to-pdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wappla/laravel-markdown-to-pdf
More information about wappla/laravel-markdown-to-pdf
Files in wappla/laravel-markdown-to-pdf
Package laravel-markdown-to-pdf
Short Description A simple way for generating PDFs using markdown
License MIT
Informations about the package laravel-markdown-to-pdf
Package still in development..
Markdown to pdf
Simple package to convert markdown files to PDF in laravel.
Requirements
- Laravel > 5.5
Installation
Install the package with composer:
This packages uses the auto discovery feature of laravel. So there is no need to register the service provider or alias.
Usage
Create a blade view and add the markdown to pdf component. Between the component element you can start writing markdown.
Below i created a simple example.blade.php :
To view this as a PDF file in your browser you dan do:
The standard directory for loading views is resources/views. No need to add the blade.php extension. If you would like to specify a custom directory you can use the dot notation.
Store this view in storage
Specifiy a custom filename or leave blank to save your pdf in storage.
The pdf will be stored based on your Laravel filesystem configuration. If you would like to specify a custom location you can create your own disk and add a second parameter to the save method.
The below example stores the pdf file on the public disk:
Configuration
Use the standard php artisan vendor:publish
laravel command an select the correct number or be more specific:
To publish all the configuration and views:
Only publish views:
Only publish config:
All versions of laravel-markdown-to-pdf with dependencies
dompdf/dompdf Version ^0.8.2
erusev/parsedown Version ^1.6
illuminate/http Version ^5.5
illuminate/support Version ^5.5