make header visible and then repeat it per page #814
Unanswered
al3xanderSL
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello I am Alexander, I was developing with this library to generate pdf.I started reading the documentation and I understood how it works, but when I began coding, because I wanted to create a pdf with header and body, it didnt work as I thought.At the beginning it was ok when I added the body, but when I wanted to add a header, It stopped working, so I decided to start a new pdf with just a simple html for both the content and header like this:
$pdf = Browsershot::html('<p>d</p>') ->showBrowserHeaderAndFooter() ->headerHtml("<p style=' font-size: 40px; margin: left 10px;'>pepepepe</p>") ->noSandbox() ->format('Tabloid') ->showBackground() ->setNodeBinary('/usr/local/bin/node') ->margins(5, 5, 7, 5) ->landscape() ->waitUntilNetworkIdle() ->windowSize(1920, 1080) ->fullPage() ->newHeadless() ->timeout(100000) ->pdf();
then this is what I get :
example_with header.pdf
I don't know why this is happening and I have removed the showBackgroundMethod(), and is still happening .Anyway, if you have any clue about how it can be fixed, let me know pls, or even if you want me to send you something else write me.
Beta Was this translation helpful? Give feedback.
All reactions