How to get page number on dompdf PDF when using “view”

前端 未结 5 1490
南笙
南笙 2020-11-30 11:49

Ok, so I use the following snippet to get \"views\" of HTML with PHP variables loaded in as $data so that I can do things like fill in tr\'s of dat

5条回答
  •  我在风中等你
    2020-11-30 12:30

    I have a simple code to showing page number in footer of every page of dom pdf

    #footer { position: fixed; right: 0px; bottom: 10px; text-align: center;border-top: 1px solid black;}
            #footer .page:after { content: counter(page, decimal); }
     @page { margin: 20px 30px 40px 50px; }
    

    above code is css code

     
    

    You can change text position according to your requirement

提交回复
热议问题