Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix method and class names in paper format docs #94

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
```