I am using dompdf to print email summaries, these emails are printed sequentially once I have a large email that doesn't fit in the remaining of the page, a new page is created and the content is printed there. resulting the first page to partially or fully blank I can't find a solution for that.
Related
i m using snappypdf and i managed to add an html footer to my file with this code in my Laravel controller:
->setOption('footer-html', view('front.mail_templates.layouts.emailFooter'))->setOption('margin-bottom',17)
but now i want to add page numbering to it, and after looking i found this solution:
->setOption('footer-right', "Page [page] of [toPage]")
The problem is i want these two to appear in my pdf but i can't make them work together they work separately but if together only html footer show and page numbering is invisible , I hovered over an empty space by chance and after copying and pasting it elsewhere, i found out it was the page number printed transparently. so is it possible to make them apear both in my footer? or any other suggestions?
EDIT
here is my footer html code :
every thing worked fine untill i added the javascript code, now it generates the following error : he exit status code '-1073741819' says something went wrong
I have a very big view which needs to be converted to PDF. I have used Rotativa but it is not properly page breaking, half of the line goes to next page and I don't know where needs to use page break because my view model generate dynamically.
Rotativa is built on top of wkhtmltopdf library, so this means that the same solutions from this post should also be a good for you: Wkhtmltopdf Characters in single line partially cut between pages
Is there any way to set minimal count of pages to pdf? So my current need looks like:
I have an header on second page that should be shown
First page has content that can overflow to second page
It is not acceptable to have 3 pages
So I need 2 pages in both cases:
First page fits to single page (so I should create second page manually)
First page overflows (at create second page by its content)
Single workaround that I found - overflow by empty (<br/>s) content. But I wanna do it with css.
I've tried to use #page:first but it wouldn't work in common css manner (like #page:first .break-page{...})
I've tried to use #page:first {break-page-after:always} - it wouldn't work...
I have a template which I'm filling with text. There is a header page, and several content pages after the header. Each content pages has two columns, and some logos and things at the bottom. I'm filling in the content dynamically with images and formatted text.
The number of pages is variable. How can I either duplicate content pages as needed, or (if I create a template with many pre-duplicated content pages) delete empty pages after filling in the content?
Well, you can add a page with myDoc.pages.add(...) and then duplicate the content.
To remove pages: myPage.remove().
But the question is somewhat vague, so it's hard to be more specific.
I have many dynamically generated pages, made by the same PHP file, and I'd like the comments that are being submitted to the user's wall have a different title and summary, considering the page they were sent from. Do I need to dynamically generate the meta tags, or is there a way to embed the title and summary in the comments widget script itself?
You will need to do the first thing...dynamically generate the og tag in the head of the document. They must be set that way when sending the HTML response to the browser. They cannot be successfully updated clientside as Facebook linter only looks at the response stream.