Skip to content

Commit

Permalink
Merge pull request #94 from vintagesucks/paper-format
Browse files Browse the repository at this point in the history
fix method and class names in paper format docs
  • Loading branch information
freekmurze authored Mar 2, 2024
2 parents 68f48d2 + 37c1b3a commit 592e9ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/basic-usage/formatting-pdfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/basic-usage/setting-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -31,6 +31,6 @@ Pdf::html('<h1>Hello world</h1>')
// here we override the default: this PDF will be rendered in A4 format

Pdf::html('<h1>Hello world</h1>')
->paperFormat(PaperFormat::A4)
->format(Format::A4)
->save('my-a4-pdf.pdf')
```

0 comments on commit 592e9ea

Please sign in to comment.