8000 Printing: Allow settings to be passed in by simonhamp · Pull Request #634 · NativePHP/laravel · GitHub
[go: up one dir, main page]

Skip to content

Printing: Allow settings to be passed in #634

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

Merged
merged 3 commits into from
Jul 11, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Comments
  • Loading branch information
simonhamp committed Jun 25, 2025
commit cb2b4a0a1641a4436912cb777ffe0518b7a363b8
5 changes: 4 additions & 1 deletion src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function printers(): array
}

/**
* For settings options, see https://www.electronjs.org/docs/latest/api/web-contents#contentsprintoptions-callback
* For $settings options, see https://www.electronjs.org/docs/latest/api/web-contents#contentsprintoptions-callback
*/
public function print(string $html, ?Printer $printer = null, ?array $settings = []): void
{
Expand All @@ -74,6 +74,9 @@ public function print(string $html, ?Printer $printer = null, ?array $settings =
]);
}

/**
* For $settings options, see https://www.electronjs.org/docs/latest/api/web-contents#contentsprinttopdfoptions
*/
public function printToPDF(string $html, ?array $settings = []): string
{
return $this->client->post('system/print-to-pdf', [
Expand Down
Loading
0