From 37c1b3a76a0d9848e4f6f011ed6ec1b7cd87e80c Mon Sep 17 00:00:00 2001 From: Nikolas Evers Date: Fri, 1 Mar 2024 18:27:26 +0100 Subject: [PATCH] fix names in paper format docs --- docs/basic-usage/formatting-pdfs.md | 4 ++-- docs/basic-usage/setting-defaults.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/basic-usage/formatting-pdfs.md b/docs/basic-usage/formatting-pdfs.md index c4d041d..ad71cd5 100644 --- a/docs/basic-usage/formatting-pdfs.md +++ b/docs/basic-usage/formatting-pdfs.md @@ -88,7 +88,7 @@ Pdf::view('pdf.invoice', ['invoice' => $invoice]) ## Paper format -By default, all PDFs are created in A4 format. You can change this by calling the `paperFormat` method. +By default, all PDFs are created in A4 format. You can change this by calling the `format` method. ```php use Spatie\LaravelPdf\Facades\Pdf; @@ -99,7 +99,7 @@ Pdf::view('pdf.invoice', ['invoice' => $invoice]) ->save('/some/directory/invoice-april-2022.pdf'); ``` -There are the available formats of the `PaperFormat` enum: +There are the available formats of the `Format` enum: ```php Letter: 8.5in x 11in diff --git a/docs/basic-usage/setting-defaults.md b/docs/basic-usage/setting-defaults.md index c0fa0e0..a37c8e9 100644 --- a/docs/basic-usage/setting-defaults.md +++ b/docs/basic-usage/setting-defaults.md @@ -15,7 +15,7 @@ use Spatie\LaravelPdf\Enums\Format; Pdf::default() ->headerView('pdf.header') - ->paperFormat(Format::A3); + ->format(Format::A3); ``` With this code, every PDF generated in your app will have the `pdf.header` view as header and will be rendered in A3 format. @@ -31,6 +31,6 @@ Pdf::html('

Hello world

') // here we override the default: this PDF will be rendered in A4 format Pdf::html('

Hello world

') - ->paperFormat(PaperFormat::A4) + ->format(Format::A4) ->save('my-a4-pdf.pdf') ```