Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7003893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:07:42+00:00 2026-05-27T21:07:42+00:00

In the most recent dompdf release (domdpf beta 2), inline php was disabled for

  • 0

In the most recent dompdf release (domdpf beta 2), inline php was disabled for security reasons. This, in turn, caused the previous footer/header code:

<script type="text/php">

if ( isset($pdf) ) {

  $font = Font_Metrics::get_font("helvetica", "bold");
  $pdf->page_text(72, 18, "Header: {PAGE_NUM} of {PAGE_COUNT}", $font, 6, array(0,0,0));

}
</script>

To no longer work.

I’m now trying to re-create what this script did using CSS. So far, I’ve figured out how to get CSS to count the pages:

.pagenum:before { content: counter(page); }

The issue I’m having is sticking the footer to the bottom of the page. Most CSS tutorials on how to do this do not seem to be working. Here’s the css for my page:

html,body {
     font-family:interstate;
    height:100%;
    width:100%;
    overflow:auto;
    margin-left: 40px;
    margin-right: 40px;
    margin-top: 20px;   
 margin-bottom:40px;
 min-height: 100%;
}



P.breakhere {page-break-before: always}

table
{
  border-collapse: collapse;
    page-break-inside: avoid;
  font-size:15px;

    }

td
{
border: 1px solid #000

}
.noBorder {
    border: 0
}


#header {background:#ffffff url('gradient.png') no-repeat center center;
height: 100px;

}

#text {
position:relative;
text-align:center;
padding:10px;
}



.pagenum:before { content: counter(page); }

My hope is someone can provide me the appropriate #footer bit, so my footer text will properly stick to the bottom of the page.

Thank you!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:07:42+00:00Added an answer on May 27, 2026 at 9:07 pm

    Inline script is disabled by default, but if you feel you are not vulnerable to any security problems you can safely re-enable it by setting DOMPDF_ENABLE_PHP to true.

    To create a header/footer using HTML+CSS you would use a fixed-position element.

    CSS

    #footer {
      position: fixed;
      bottom: 0px;
      left: 0px;
      right: 0px;
      height: 100px;
      text-align: center;
      background-color: lightgray;
      border-top: 2px solid gray;
    }
    .pagenum:before {
      content: counter(page);
    }
    

    HTML

    <div id="footer">
      <p>page <span class="pagenum"></span></p>
    </div>
    

    The main drawback to the HTML+CSS method is that there is currently no way to get the total number of pages using this method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to delete the most recent entry in MySQL using PHP, is there
The most recent comment on PHP's in_array() help page ( http://uk.php.net/manual/en/function.in-array.php#106319 ) states that
The most recent release of the GAE states the following changes: Datastore Cross Group
This is a question from the most recent version of Stroustrup's The C++ Programming
This works fine and gives me the most recent results back: SELECT * FROM
I am trying to show the 8 most recent scans added by doing this:
Running most recent version of PHP under most recent build of WAMPserver. Database is
Im using the most recent moo release and trying to write a function that
i get this error: Traceback (most recent call last): File <stdin>, line 1, in
I'm getting this error Traceback (most recent call last): File /home/<username>/flup/server/fcgi_base.py, line 558, in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.