Skip to content

Can't include project images or css #54

Description

@matiasiglesias

I ca't find the way to include site images and css in my pdf

On my controller:

$pdf = new PdfModel();

$pdf->setOption('filename', 'myfile.pdf');
$pdf->setOption('terminal',true);
$pdf->setOption('paperSize', 'a4');

$pdf->setTemplate('my/model/view.phtml');

$pdf->setVariables(array(
    'foo' => $bar,
));
return $pdf;

On my View:

<head>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/font-awesome.min.css">
</head>
<body>
   <div class="hero">
      <h3>My pdf file</h3>
      <img src="/img/logo.png" alt="My Logo">
   </div>
</body>

but no image or any css style is displayed.... What I am doing wrong? Please give me a hint. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions