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

  • Home
  • SEARCH
  • 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 8563977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:05:36+00:00 2026-06-11T17:05:36+00:00

I am using DOMPDF library 0.6.0 beta 3 to generate pdf files using PHP.

  • 0

I am using DOMPDF library 0.6.0 beta 3 to generate pdf files using PHP. Some of my html can be processed to PDF correctly and some not. Below is an example of one which can not. I have validated my html via w3c html validator. What can I do to resolve this issue?

<?php
  require_once("dompdf/dompdf_config.inc.php");
    $html = "<!DOCTYPE html>
            <html>
              <head>
              <title></title>
                      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
              </head>
             <body>
                 <p>Algarve Bird Watching Festival About to Begin</p>
                 <p><span style='font-family:calibri;font-size:11pt'>&nbsp;</span></p>
                 <p>Test Title</p>
                 <p>Lorem ipsum sit dolor amet<sup>th</sup> Lorem ipsum sit dolor amet </p>
                 <p>Lorem ipsum sit dolor amet</p>
                 <p>Lorem ipsum sit dolor amet </p>
                 <p>Lorem ipsum sit dolor amet <a href='http://www.test.com'>test</a>
                  Lorem ipsum sit dolor amet &nbsp; 
                  </p>
    <p><span style='font-family:calibri;font-size:11pt'>&nbsp;</span></p>
             </body>
             </html>";

    $dompdf = new DOMPDF();
    $dompdf->load_html($html);
    $dompdf->set_paper("a4", "portrait");
    $dompdf->render();
    $dompdf->stream();
?>
  • 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-06-11T17:05:37+00:00Added an answer on June 11, 2026 at 5:05 pm

    Check your double quotes:

    $html = '<!DOCTYPE html>
            <html>
              <head>
              <title></title>
                      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
              </head>
             <body>
                 <p>Algarve Bird Watching Festival About to Begin</p>
                 <p><span style="font-family:calibri;font-size:11pt">&nbsp;</span></p>
                 <p>Test Title</p>
                 <p>Lorem ipsum sit dolor amet<sup>th</sup> Lorem ipsum sit dolor amet </p>
                 <p>Lorem ipsum sit dolor amet</p>
                 <p>Lorem ipsum sit dolor amet </p>
                 <p>Lorem ipsum sit dolor amet <a href="http://www.test.com">test</a>
                  Lorem ipsum sit dolor amet &nbsp; 
                  </p>
    <p><span style="font-family:calibri;font-size:11pt">&nbsp;</span></p>
             </body>
             </html>';
    

    edit

    furthermore, DOMPDF may not know the font calibri.


    edit

    You don’t have a <title> tag content. Could that be the cause?

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

Sidebar

Related Questions

i'm using dompdf library to render some html content into pdf files. I actually
I'm using the dompdf HTML to PDF converter to dynamically generate PDF files based
Hi i'm saving some html stuff with .pdf extension using dompdf. The problem is
I am using Dompdf to generate A5 pdf documents from a html template and
iam using dompdf to generate pdf file from html , the problem is the
Im trying to generate pdf using dompdf, how can I open the pdf in
I am using the DOMPDF library to create an invoice in PDF. This document
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
i'm using the dompdf library with Codeigniter (php 5 ++) , everythings works great,
After creating a PDF file in PHP Using DOMPDF, I need to redirect user

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.