Merge pull request 'changed logic in sticker pdf service' (#64) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #64
This commit was merged in pull request #64.
This commit is contained in:
@@ -775,12 +775,17 @@ class StickerPdfService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return $pdf->Output('sticker.pdf', 'S');
|
$pdfContent = $pdf->Output('', 'S'); // 'S' returns string
|
||||||
$pdfContent = $pdf->Output('sticker.pdf', 'S');
|
|
||||||
|
|
||||||
return (new Response($pdfContent, 200))
|
// Encode as base64
|
||||||
->header('Content-Type', 'application/pdf')
|
return base64_encode($pdfContent);
|
||||||
->header('Content-Disposition', 'inline; filename="sticker.pdf"');
|
|
||||||
|
// // return $pdf->Output('sticker.pdf', 'S');
|
||||||
|
// $pdfContent = $pdf->Output('sticker.pdf', 'S');
|
||||||
|
|
||||||
|
// return (new Response($pdfContent, 200))
|
||||||
|
// ->header('Content-Type', 'application/pdf')
|
||||||
|
// ->header('Content-Disposition', 'inline; filename="sticker.pdf"');
|
||||||
}
|
}
|
||||||
|
|
||||||
// private function hexToRgb($hex)
|
// private function hexToRgb($hex)
|
||||||
|
|||||||
Reference in New Issue
Block a user