dompdf placing same font in full bodytag












0














I have installed tangerine in my dompdf. Now what is happening is when i try on my windows machine it works fine. But in ubuntu when i put the same code in xampp the generated pdf is massed up. I used the tangerine font with only my h3 tags but in the generated pdf the font style is placed in whole body. Here is my dompdf settings



<?php
// Include autoloader
require_once 'dompdf/autoload.inc.php';

// Reference the Dompdf namespace
use DompdfDompdf;

// Instantiate and use the dompdf class
$dompdf = new Dompdf(array('isPhpEnabled' => true));

// Load content from html file
ob_start();
include_once 'pdfcontent.php';
$output = ob_get_clean();
$dompdf->loadHtml($output);

//$dompdf->loadHtml($html);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('b4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF (1 = download and 0 = preview)
$dompdf->stream("funeral",array("Attachment"=>0));
?>









share|improve this question






















  • have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
    – Matmarbon
    20 hours ago
















0














I have installed tangerine in my dompdf. Now what is happening is when i try on my windows machine it works fine. But in ubuntu when i put the same code in xampp the generated pdf is massed up. I used the tangerine font with only my h3 tags but in the generated pdf the font style is placed in whole body. Here is my dompdf settings



<?php
// Include autoloader
require_once 'dompdf/autoload.inc.php';

// Reference the Dompdf namespace
use DompdfDompdf;

// Instantiate and use the dompdf class
$dompdf = new Dompdf(array('isPhpEnabled' => true));

// Load content from html file
ob_start();
include_once 'pdfcontent.php';
$output = ob_get_clean();
$dompdf->loadHtml($output);

//$dompdf->loadHtml($html);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('b4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF (1 = download and 0 = preview)
$dompdf->stream("funeral",array("Attachment"=>0));
?>









share|improve this question






















  • have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
    – Matmarbon
    20 hours ago














0












0








0







I have installed tangerine in my dompdf. Now what is happening is when i try on my windows machine it works fine. But in ubuntu when i put the same code in xampp the generated pdf is massed up. I used the tangerine font with only my h3 tags but in the generated pdf the font style is placed in whole body. Here is my dompdf settings



<?php
// Include autoloader
require_once 'dompdf/autoload.inc.php';

// Reference the Dompdf namespace
use DompdfDompdf;

// Instantiate and use the dompdf class
$dompdf = new Dompdf(array('isPhpEnabled' => true));

// Load content from html file
ob_start();
include_once 'pdfcontent.php';
$output = ob_get_clean();
$dompdf->loadHtml($output);

//$dompdf->loadHtml($html);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('b4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF (1 = download and 0 = preview)
$dompdf->stream("funeral",array("Attachment"=>0));
?>









share|improve this question













I have installed tangerine in my dompdf. Now what is happening is when i try on my windows machine it works fine. But in ubuntu when i put the same code in xampp the generated pdf is massed up. I used the tangerine font with only my h3 tags but in the generated pdf the font style is placed in whole body. Here is my dompdf settings



<?php
// Include autoloader
require_once 'dompdf/autoload.inc.php';

// Reference the Dompdf namespace
use DompdfDompdf;

// Instantiate and use the dompdf class
$dompdf = new Dompdf(array('isPhpEnabled' => true));

// Load content from html file
ob_start();
include_once 'pdfcontent.php';
$output = ob_get_clean();
$dompdf->loadHtml($output);

//$dompdf->loadHtml($html);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('b4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF (1 = download and 0 = preview)
$dompdf->stream("funeral",array("Attachment"=>0));
?>






php dompdf google-webfonts






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 21 hours ago









Rayhan Showrov

112




112












  • have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
    – Matmarbon
    20 hours ago


















  • have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
    – Matmarbon
    20 hours ago
















have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
– Matmarbon
20 hours ago




have you thought about switching to wkhtmltopdf? The main difference is that it doesn't try to emulate a browser rendering engine but instead really just is the webkit engine as in chrome's print function.
– Matmarbon
20 hours ago

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53942906%2fdompdf-placing-same-font-in-full-bodytag%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53942906%2fdompdf-placing-same-font-in-full-bodytag%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas