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

Method setHttpContext for avoid using getDomPDF #871

Closed
wants to merge 1 commit into from

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Mar 16, 2022

https://github.com/dompdf/dompdf/blob/116404a740f937cb40534fa559468206e5bf9023/src/Dompdf.php#L1236-L1246

If you use getDomPDF for setHttpContext, you can't keep concatenating methods

Example:

return PDF::loadView('pdf')
    ->setHttpContext(['ssl'=>['verify_peer'=>false, 'verify_peer_name'=>false, 'allow_self_signed'=>true]])
    ->stream();

Before:

$pdf = PDF::loadView('pdf');
$pdf->getDomPDF()
    ->setHttpContext(
        stream_context_create(['ssl'=>['verify_peer'=>false, 'verify_peer_name'=>false, 'allow_self_signed'=>true]])
    );
return $pdf->stream();

@barryvdh
Copy link
Owner

Fixed with #892

@barryvdh barryvdh closed this Jun 26, 2022
@erikn69 erikn69 deleted the patch-2 branch June 28, 2022 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants