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

Can't include project images or css #54

Open
matiasiglesias opened this issue Nov 20, 2016 · 0 comments
Open

Can't include project images or css #54

matiasiglesias opened this issue Nov 20, 2016 · 0 comments
Labels

Comments

@matiasiglesias
Copy link

matiasiglesias commented Nov 20, 2016

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants