Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
How to include s3 url inside pdf files dompdf.

My s3 url is https://s3-us-west-2.amazonaws.com/bucket_name/test.png

its working fine on browser and showing image not found after including it on pdf file.   

$pdf = new \DOMPDFModule\View\Model\PdfModel(); 
$pdf->setOption("filename", $filename); 
$pdf->setOption("paperSize", "a4"); 
$pdf->setOption("paperOrientation", "landscape"); 
$dompdf = new \DOMPDF(); 
$dompdf->load_html($html);
$dompdf->render(); 
$pdfCode = $dompdf->output(); 
file_put_contents('path_to_pdf/test.pdf', $pdfCode); 
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you use Laravel, you need to add this to your blade.

@php
    use Illuminate\Support\Facades\Storage;
    $content = Storage::get('vinylmaster.png');
    $imageData = base64_encode($content);
    $src = 'data:image/png;base64,' . $imageData;
@endphp

<img src="{{$src}}">

if you are not on Laravel, try Embedding images in a PDF file with PHP and DOMPDF

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!