Replies: 11 comments 4 replies
-
Which version are you using? Taking a quick look at how that entity renders in various releases I do see the issue starting with release 0.8.4 that runs through 1.2.1. It renders correctly in 1.2.2 (the current release). I'd have to look into it the issue more to see exactly where things broke. |
Beta Was this translation helpful? Give feedback.
-
1.0.2 is the version. Hmm – I thought I had downloaded a newer one than that as it wasn’t that long ago. Ok I will download the latest one in the morning and try it - thanks
|
Beta Was this translation helpful? Give feedback.
-
Any luck yet with finding out why the , problem is still happening in 1.2.2?
|
Beta Was this translation helpful? Give feedback.
-
Yep it is ☹
I have attached what I am getting.
|
Beta Was this translation helpful? Give feedback.
-
`<h3">Answer: ' . trim($Answers[$i]) . '</h3>` doesn’t render a comma as part of trim($Answers[$i])
`<h3">,</h3>` renders a comma alright
`. trim($Answers[$i]) .` is the problem whether it has a `,` or just a , as part of the answer
If that helps
|
Beta Was this translation helpful? Give feedback.
-
Is the HTML: https://github.com/dompdf/dompdf/files/8782367/sample.txt
Hmm – that is coming correctly when you view it in a browser but not in the PDF.
|
Beta Was this translation helpful? Give feedback.
-
`£` is ok but not `,`
Eg this is ok
```
html_entity_decode(trim($rowProject["Title"]) . "£",ENT_COMPAT,"UTF-8");
```
converts the `£` to a £ but it doesn’t touch `,`
How on earth do I convert `,`
Any ideas other than a replace?
Thanks
Pam
|
Beta Was this translation helpful? Give feedback.
-
Solved
```
$Questions[] = html_entity_decode(trim($rowQuestion["TheQuestion"]),ENT_COMPAT | ENT_HTML5,"UTF-8");
```
etc
The `| ENT_HTML5` Solved it
Hurray
Thank for your help
Pam
|
Beta Was this translation helpful? Give feedback.
-
Nope still doesn’t work ☹ I thought you had spotted it- boohoo
```
<html>
<head>
<script type="text/javascript" src="https://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=ivlNFr-4zHMtxCSV0WhozLSlVTO219YeLu1Jcz2rY0NaSM9P5C8WOEk0oQONthBUldDxCJpYwqG-ijIvLN6D7by1Hgun-gx2twdNTJ2sRUPuuXFzpmBstSTFN2uV0zJt" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="https://gc.kis.v2.scr.kaspersky-labs.com/E3E8934C-235A-4B0E-825A-35A08381A191/abn/main.css?attr=aHR0cHM6Ly93d3cuY2RtcmVndWxhdGlvbnMudWsvaW5jbHVkZXMvZ2VuZXJhdGVfbGVnaXNsYXRpb25fY2hlY2tfcGRmLnBocA"/><style>
@import url(http://fonts.googleapis.com/css?family=Dosis);
@import url(http://fonts.googleapis.com/css?family=Carme);
@import url(http://fonts.googleapis.com/css?family=Scada);
@import url(http://fonts.googleapis.com/css?family=Nobile);
@import url(http://fonts.googleapis.com/css?family=Alef);
@import url(http://fonts.googleapis.com/css?family=Economica);
@import url(http://fonts.googleapis.com/css?family=Marmelad);
@import url(http://fonts.googleapis.com/css?family=Viga);
@import url(http://fonts.googleapis.com/css?family=Oswald);
@import url(http://fonts.googleapis.com/css?family=Raleway);
@import url(http://fonts.googleapis.com/css?family=Roboto);
@charset "utf-8";
/* ************************** BODY STYLES *****************************/
p
{
padding-bottom: 12px;
}
body { margin: 0px; font-size: 14px; background-color: white;}
/* ************************** LIST STYLES *****************************/
ul
{
list-style-type: square;font-family: "Roboto"; font-size: 11pt; font-weight: 400; color: #0D0B3B;
}
/* ************************** HEADER STYLES ****************************/
/* --- HEADER 1 STYLES --- */
@font-face {
font-family: Roboto;
font-weight: 600;
font-style: medium; src: url("https://www.cdmregulations.uk/includes/dompdf/dompdf/lib/fonts/Roboto-Medium.ttf") format("truetype");
}
@font-face {
font-family: Roboto;
font-weight: 400;
font-style: normal; src: url("https://www.cdmregulations.uk/includes/dompdf/dompdf/lib/fonts/Roboto-Regular.ttf") format("truetype");
}
@font-face {
font-family: Roboto;
font-weight: 900;
font-style: normal; src: url("https://www.cdmregulations.uk/includes/dompdf/dompdf/lib/fonts/Roboto-Black.ttf") format("truetype");
}
strong {
font-family: Roboto;
font-weight: 900;
}
P {
font-family: Roboto;
font-weight: 600;
display: block;
margin: 0px 0 0px 0;
font-size: 12pt;
color: #141414;
text-decoration: none;
}
h1 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 24pt;
color: #000000;
text-decoration: none;
}
h2 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #000000;
text-decoration: none;
}
h2.blue {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #00A8E3;
text-decoration: none;
}
h3 {
font-family: "Roboto";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 11pt;
color: #000000;
text-decoration: none;
}
h4 {
font-family: "Roboto";
font-weight: 600;
display: block;
margin: 0px 0 0px 0;
font-size: 12pt;
color: #141414;
text-decoration: none;
}
h5 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 16pt;
color: #0092C3;
text-decoration: none;
}
h6 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #000000;
text-decoration: none;
}
hr{
width: 100%;
color: #C0C0C0;
}
style="width: 100%" color="#C0C0C0" size="0"
/* ************************** TABLE STYLES *****************************/
.NoPads h1, h2, h3, h4, h5, h6 {
padding-bottom: 0;
}
div.page_break{
page-break-before: always;
}
</style>
</head>
<body>
<p align="center"><img src="https://www.cdmregulations.uk/PDF/HEADER_Legislation.jpg" width="100%"></p>
<div align="center">
<br>
<Br>
<table border="0" style="border-collapse: collapse" width="100%" cellpadding="0">
<tr>
<td style="text-align: center">
<h1>Legislation Check</h1>
</td>
</tr>
<tr>
<td style="text-align: center">
<h2>New boilers</h2>
</td>
</tr>
</table>
</div>
<br><br>
<div align="center">
<table border="0" width="100%" cellpadding="0" border="1">
<tr>
<td colspan="6">
<h3>Question 1: Will you be using ladders, steps, podiums or any other equipment that will give you access to height??</h3>
</td>
</tr>
<tr>
<td colspan="6">
<h3>Answer: Working at Height Regulations 2005<br /><br />In order to remain compliant, the Working at height regulations require the following to be considered:<br /><br />
<ul>
<li>Can you avoid working at height?</li>
<li>Are ladders your last resort?</li>
<li>Is the scaffolding being inspected every 7 days?</li>
<li>Are you protecting memebers of public, site operatives from falling objects? </li>
</ul></h3>
</td>
</tr>
<tr>
<td colspan="6"><h3><br></h3>
</td>
</tr>
<tr>
<td colspan="6">
<h3>Question 2: Will you be using power tools such as chop saws, diamond blades and grinders??</h3>
</td>
</tr>
<tr>
<td colspan="6">
<h3>Answer: Provision and Use of Work Equipment Regulations (PUWER) 1998</h3>
</td>
</tr>
<tr>
<td colspan="6"><h3><br></h3>
</td>
</tr>
<tr>
<td colspan="6">
<h3>Question 3: Will you be cutting, drilling, chasing, tile cutting??</h3>
</td>
</tr>
<tr>
<td colspan="6">
<h3>Answer: Control of Hazardous Substances 2002?</h3>
</td>
</tr>
<tr>
<td colspan="6"><h3><br></h3>
</td>
</tr></table>
</div>
<p align="center"><img src="https://www.cdmregulations.uk/PDF/FOOTER.jpg" width="100%"></p>
</body>
```
Blast - Thanks
Pam
|
Beta Was this translation helpful? Give feedback.
-
This is what I had
namespace Dompdf;
require_once 'dompdf/dompdf/autoload.inc.php';
$dompdf = new Dompdf();
$dompdf->loadHtml('
etc
I have downloaded the latest version but there is no autoload.inc.php in there
What do I do please?
Help
Thanks
P Whittaker
From: Brian Sweeney ***@***.***>
Sent: 24 May 2022 20:01
To: dompdf/dompdf ***@***.***>
Cc: Pamela Whittaker ***@***.***>; Author ***@***.***>
Subject: Re: [dompdf/dompdf] Special Character Problem (Discussion #2891)
Which version are you using? Taking a quick look at how that entity renders in various releases I do see the issue starting with release 0.8.4 that runs through 1.2.1. It renders correctly in 1.2.2 (the current release). I'd have to look into it the issue more to see exactly where things broke.
—
Reply to this email directly, view it on GitHub <#2891 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJXBHTEDJERY4GBODMPMGSTVLURNNANCNFSM5W2EGDJA> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I had downloaded the wrong zip – oops
I have now got the latest one downloaded but it still isn’t working
$dompdf->loadHtml('
<html>
<head>
<style>
@import url(http://fonts.googleapis.com/css?family=Dosis);
@import url(http://fonts.googleapis.com/css?family=Carme);
@import url(http://fonts.googleapis.com/css?family=Scada);
@import url(http://fonts.googleapis.com/css?family=Nobile);
@import url(http://fonts.googleapis.com/css?family=Alef);
@import url(http://fonts.googleapis.com/css?family=Economica);
@import url(http://fonts.googleapis.com/css?family=Marmelad);
@import url(http://fonts.googleapis.com/css?family=Viga);
@import url(http://fonts.googleapis.com/css?family=Oswald);
@import url(http://fonts.googleapis.com/css?family=Raleway);
@import url(http://fonts.googleapis.com/css?family=Roboto);
@charset "utf-8";
/* ************************** BODY STYLES *****************************/
p
{
padding-bottom: 12px;
}
body { margin: 0px; font-size: 14px; background-color: white;}
/* ************************** LIST STYLES *****************************/
ul
{
list-style-type: square;font-family: "Roboto"; font-size: 11pt; font-weight: 400; color: #0D0B3B;
}
/* ************************** HEADER STYLES ****************************/
/* --- HEADER 1 STYLES --- */
@font-face {
font-family: Roboto;
font-weight: 600;
font-style: medium; src: url("' . $Theprotocol . $_SERVER['HTTP_HOST'] . '/includes/dompdf/dompdf/lib/fonts/Roboto-Medium.ttf") format("truetype");
}
@font-face {
font-family: Roboto;
font-weight: 400;
font-style: normal; src: url("' . $Theprotocol . $_SERVER['HTTP_HOST'] . '/includes/dompdf/dompdf/lib/fonts/Roboto-Regular.ttf") format("truetype");
}
@font-face {
font-family: Roboto;
font-weight: 900;
font-style: normal; src: url("' . $Theprotocol . $_SERVER['HTTP_HOST'] . '/includes/dompdf/dompdf/lib/fonts/Roboto-Black.ttf") format("truetype");
}
strong {
font-family: Roboto;
font-weight: 900;
}
P {
font-family: Roboto;
font-weight: 600;
display: block;
margin: 0px 0 0px 0;
font-size: 12pt;
color: #141414;
text-decoration: none;
}
h1 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 24pt;
color: #000000;
text-decoration: none;
}
h2 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #000000;
text-decoration: none;
}
h2.blue {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #00A8E3;
text-decoration: none;
}
h3 {
font-family: "Roboto";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 11pt;
color: #000000;
text-decoration: none;
}
h4 {
font-family: "Roboto";
font-weight: 600;
display: block;
margin: 0px 0 0px 0;
font-size: 12pt;
color: #141414;
text-decoration: none;
}
h5 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 16pt;
color: #0092C3;
text-decoration: none;
}
h6 {
font-family: "Oswald";
font-weight: 400;
display: block;
margin: 0px 0 0px 0;
font-size: 18pt;
color: #000000;
text-decoration: none;
}
hr{
width: 100%;
color: #C0C0C0;
}
style="width: 100%" color="#C0C0C0" size="0"
/* ************************** TABLE STYLES *****************************/
.NoPads h1, h2, h3, h4, h5, h6 {
padding-bottom: 0;
}
div.page_break{
page-break-before: always;
}
</style>
</head>
<body
<div align="center">
<table border="0" width="100%" cellpadding="0" border="1">
' . $Rows
. '</table>
</div>
</body>
');
If I echo $Rows I get
Question 1: Will you be using power tools such as chop saws, diamond blades and grinders??
Answer: Provision and Use of Work Equipment Regulations (PUWER) 1998
Question 2: Will you be cutting, drilling, chasing, tile cutting??
Answer: Control of Hazardous Substances 2002?
Which is correct
The pdf has
Question 1: Will you be using power tools such as chop saws, diamond blades and grinders??
Answer: Provision and Use of Work Equipment Regulations (PUWER) 1998
Question 2: Will you be cutting, drilling, chasing, tile cutting??
Answer: Control of Hazardous Substances 2002?
It still has ,
Thanks
P Whittaker
From: Brian Sweeney ***@***.***>
Sent: 24 May 2022 20:01
To: dompdf/dompdf ***@***.***>
Cc: Pamela Whittaker ***@***.***>; Author ***@***.***>
Subject: Re: [dompdf/dompdf] Special Character Problem (Discussion #2891)
Which version are you using? Taking a quick look at how that entity renders in various releases I do see the issue starting with release 0.8.4 that runs through 1.2.1. It renders correctly in 1.2.2 (the current release). I'd have to look into it the issue more to see exactly where things broke.
—
Reply to this email directly, view it on GitHub <#2891 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJXBHTEDJERY4GBODMPMGSTVLURNNANCNFSM5W2EGDJA> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have
,
appearing in the pdf instead of a , even thought I have used htmlspecialchars_decode() to convert it. How do I get a , appearing instead of,
and the same with any other Special Characters. ThanksBeta Was this translation helpful? Give feedback.
All reactions