dompdf

DOMPDF text is bolder than normal

痴心易碎 提交于 2019-12-13 07:59:09
问题 I cant understand why the font color in DOMPDF is bolder than normal. jsfiddle with the html Image comparing HTML to DOMPDF: Thanks for the help. 回答1: As BrianS said, the cause for the problem is PNG 8 bit. I made a function which converts all PNGs to JPGs and that solved the problem. This is good if you don't which format it is > PNG or JPG. Thanks BrianS. 来源: https://stackoverflow.com/questions/11652821/dompdf-text-is-bolder-than-normal

Export pdf document with php using dompdf

試著忘記壹切 提交于 2019-12-13 05:17:21
问题 I have a question for you, so I tried to export pdf document with php using dompdf,all goes well but when I send php variables to display it's add to the end and the beginning .%27 public function generateTitlePage($number_cadastral='') { $this->load->library('dompdf_gen'); $dompdf = new DOMPDF(); $html = <<<HTML <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" media="screen" href="TitlePage.css" /> </head> <body> <div style="margin-top: 100px; text-align: right;

DomPDF {PAGE_NUM} not on first page

ε祈祈猫儿з 提交于 2019-12-12 21:27:45
问题 I'm using domPDF to generate a PDF-Documentation. After activating the inline PHP in the dompdf_config.inc.php and dompdf_config.custom.inc.php I've added the following code to display the page Numbers: <script type="text/php"> $pdf->page_text(50, 20, "Seite {PAGE_NUM}", Font_Metrics::get_font("sans-serif"), 10, array(0,0,0)); </script> Now this works quite well, but sady, I'm not able to somehow declare, that this should not be done on the first page. Are there any options to do so? Thank

Image not found or type unknown (using tinymce with dompdf to show html stored in tinymce textarea in a pdf)

試著忘記壹切 提交于 2019-12-12 17:19:11
问题 I'm using tinymce with image upload using the package "laravel-tinymce-simple-imageupload". When the user enters some content in the textarea and clicks the form submit button I want to put the content in the textarea in a pdf file. I have the code below. The issue is that in the pdf file, if is inserted an image in the textarea, the image doesn't appear in the pdf and in the pdf appears "Image not found or type unknown". Do you know what can be the issue? The image is stored like this in the

Google Webfonts in PDF generated by DOMPDF

泪湿孤枕 提交于 2019-12-12 10:53:30
问题 I am using two webfonts in a page that I convert to a PDF using dompdf. I have this in the header: <link href='http://fonts.googleapis.com/css?family=Signika:600|Roboto+Condensed' rel='stylesheet' type='text/css'> I then use them in CSS rules like body { font-family: "Roboto Condensed", sans-serif; [ ... ] } h1 { font-family:'Signika', Arial, Helvetica, sans-serif; [ ... ] } Now, when I generate the PDF, the h1 is displayed with the "Signika" font, but "Roboto Condensed" is replaced by

dompdf - text on a single page / page_script doesnt work

走远了吗. 提交于 2019-12-12 10:15:17
问题 I'm using dompdf 0.7.0 and try to write down text in PHP on my pdf after rendering. I need text on specific pages and found the following from Answer from Brian DomPDF {PAGE_NUM} not on first page The function page_script sound like the correct answer. I could check if loop is currently on page 3 or whatever. Does I have to enable any options for this function? Example: $dompdf = new Dompdf( $options ); $dompdf->set_option('default_font', 'open sans'); $dompdf->set_option('fontHeightRatio', 1

Dompdf — Error in php

别来无恙 提交于 2019-12-12 06:13:31
问题 %PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Creator (DOMPDF) /CreationDate (D:20150818031116-05'00') /ModDate (D:20150818031116-05'00') >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj <

How I can break my document correctly with DOMPDF?

让人想犯罪 __ 提交于 2019-12-12 05:27:30
问题 I want to generate a PDF with DOMPDF through dynamic content. I am creating a table like this: <?php $language = $this->input->cookie('language'); if (!isset($language)) { $language = $core_settings->language; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta name="Author" content=""/> <meta http-equiv="Content-Type" content="text/html;

Dompdf package other languages support in laravel

回眸只為那壹抹淺笑 提交于 2019-12-12 04:54:22
问题 i have created my pdf using dompdf package in laravel project. But when i want to render other language (bangla) instead of english ???????????????????????????? are shown. <body style="font-family: 'AdorshoLipi', Arial, sans-serif !important;"> <div style="border-style: solid; border-width: 2px; margin: 50px; padding: 10px;"> <div align="center"> <h2> Anti-corruption commission hotline-106 </h2> </div> <div> <p> Reference No : {{ $complain->call_ref_id }}</p> {{-- <br> --}} <p> Date : {{

DomPDF Failed To Generate PDF from Simple HTML Bootstrap

穿精又带淫゛_ 提交于 2019-12-12 04:06:00
问题 I have this simple HTML file ( simple.html ) to test DomPDF : <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Bootstrap 101 Template</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn