kartik-v / mpdf Goto Github PK
View Code? Open in Web Editor NEWFork of the mPDF latest DEV library (unofficial) with composer and packagist support.
License: GNU General Public License v2.0
Fork of the mPDF latest DEV library (unofficial) with composer and packagist support.
License: GNU General Public License v2.0
When trying to generate link:
echo Html::a('www.aaaa.com', 'www.aaaa.com');
The generated link in PDF document became http://localhost/app/web/www.aaaa.com
. Is it possible to generate external link without including application URL?
This error was fixed in mpdf: mpdf/mpdf#778
Could you implement this solution here?
Thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Weird having issue with this tarball in composer
https://api.github.com/repos/kartik-v/mpdf/zipball/6ab0ae3a82673e514f168c8e6da02289e6d95f2c
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
removewrong place
An Error occurred while handling another error:
exception 'ReflectionException' with message 'Class robregonm\pdf\PdfResponseFormatter does not exist' in /var/sentora/hostdata/zadmin/public_html/.../vendor/yiisoft/yii2/di/Container.php:422
Previous exception:
exception 'yii\base\ErrorException' with message 'file_put_contents(/var/sentora/hostdata/zadmin/public_html/.../vendor/mpdf/mpdf/ttfontdata/xbriyaz.GSUBGPOStables.dat): failed to open stream: Permission denied' in /var/sentora/hostdata/zadmin/public_html/.../vendor/mpdf/mpdf/classes/ttfontsuni.php:1264
Hi!
My web hosting provider says that the file:
example61_new_mPDF_v6-0_features.pdf
contains a malware and try to send out emails. I don't see any problem with the code, but they insist that there is a harmful part and the virustotal also says the file is infected.
https://www.virustotal.com/hu/file/470ebc36ae8159aa9e17bed0d580c9a52634142c50fb3ab1728526b01ba9ef5e/analysis/1454593476/
Could you please tell me if you have any idea why is the false positive?
Or sg else gone wrong
Updating dependencies (including require-dev)
- Updating kartik-v/mpdf (v1.0.1 => v1.0.2)
Checking out cd239c6b4897302142316cdb01f32f5f57d9a108
cd239c6b4897302142316cdb01f32f5f57d9a108 is gone (history was rewritten?)
Line 8354 mpdf.php
if (($file != "..") && ($file != ".") && !is_dir($file) && ((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && (substr($file, 0, 1) !== '.') && ($file !='dummy.txt')) { // mPDF 5.7.3
Invalid is_dir check file, there is no have path of this file/dir so it always return false, it must by like this:
if (($file != "..") && ($file != ".") && !is_dir(_MPDF_TEMP_PATH.$file) && ((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && (substr($file, 0, 1) !== '.') && ($file !='dummy.txt')) { // mPDF 5.7.3
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hello amigo! what I am doing wrong?
The requested package kartik-v/mpdf could not be found in any version, there may be a typo in the package name
I have created an HTML page using bootstrap and CSS. When I try to render it I am getting error
`$content = $this->renderPartial('_bill', ['dataProvider' => $dataProvider]);
$pdf = new Pdf([
// set to use core fonts only
'mode' => Pdf::MODE_UTF8,
// A4 papr format
'format' => Pdf::FORMAT_A4,
// portrait orientation
'orientation' => Pdf::ORIENT_PORTRAIT,
// stream to browser inline
'destination' => Pdf::DEST_DOWNLOAD,
// your html content input
'content' => $content,
// format content from your own css file if needed or use the
// enhanced bootstrap css built by Krajee for mPDF formatting
//'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',
// any css to be embedded if required
'cssInline' => '.kv-heading-1{font-size:14px}',
// set mPDF properties on the fly
'options' => ['title' => 'Bill'],
// call mPDF methods on the fly
'methods' => [
'SetHeader' => ['Generated On: ' . date("Y-m-d h:i:sa")],
'SetFooter' => ['{PAGENO}']
]
]);
$pdf->filename = "Bill.pdf";
try {
return $pdf->render();
} catch (MpdfException $e) {
print_r('MPDF Execption ');
echo '<br/>';
print_r($e->getMessage());
exit();
} catch (CrossReferenceException $e) {
print_r('Cross Reference Execption ');
echo '<br/>';
print_r($e->getMessage());
exit();
} catch (PdfTypeException $e) {
print_r('Pdf Type Execption ');
echo '<br/>';
print_r($e->getMessage());
exit();
} catch (PdfParserException $e) {
print_r('Pdf Parser Execption ');
echo '<br/>';
print_r($e->getMessage());
exit();
} catch (InvalidConfigException $e) {
print_r('(Invalid Config Execption ');
echo '<br/>';
print_r($e->getMessage());
exit();
}
`
Here is the Fiddle
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Possible to use mpdf/mpdf for yii2-mpdf package? because mpdf/mpdf is now supported PHP7.
I tried with:
\r\n
a\r\nb\r\nc
\x0D\x0A
a\x0D\x0Ab\x0D\x0Ac
%0A
in the query string...
?test=a%0Ab%0Ac
and then
<barcode code="<?php print $_GET["test"]; ?>" type="QR" error="H" />
but nothing.
After the generation my phone scan it as "a b c".
How to solve it?
Thanks in advance
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The default kartik boostrap css file attached content disappears in function output(). Why? What do I do wrong?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Why is the Persian time not added?
case 'ir' : case 'iri'
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Matrix equations are working in html page, but its not working in mpdf after submitting a form.
Example code :
\[ \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right) % \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right) \]
Hi, my project run on php 7.2.20 and if i want to generate pdf throught mpdf component show my this error: count(): Parameter must be an array or an object that implements Countable
vendor/mpdf/mpdf/classes/ttfontsuni.php
line: 613 for ($i = 0; $i < count($psName); $i++) {
Hi
My eclipse (mars-1) shows an error in Line 7.
function __construct((&$mpdf) {
There is one "(" to much I think.
Sven
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
There is an error in cssmgr.php:164 :
if (preg_match('/@media/',$CSSstr)) {
preg_match_all('/@media(.*?)\{(([^\{\}]*\{[^\{\}]*\})+)\s*\}/is',$CSSstr,$m);
for($i=0; $i<count($m[0]); $i++) {
if ($this->mpdf->CSSselectMedia && !preg_match('/('.trim($this->mpdf->CSSselectMedia).'|all)/i',$m[1][$i])) {
$CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/','',$CSSstr);
}
else {
$CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/',' '.$m[2][$i].' ',$CSSstr);
}
}
}
On large CSS files with complicated rules it may cause regexp limit when replacing by preg_replace:
exception 'yii\base\ErrorException' with message 'preg_replace(): Compilation failed: regular expression is too large at offset 70187' in .../vendor/kartik-v/mpdf/classes/cssmgr.php:164
... but (as far as I can see) there is no real need in preg_replace()
in this place. We have exact text, matched by preg_match_all()
and now we can use str_replace()
(or mb_str_replace()
) to clear it out.
P.S. I don't offer pull request because I can miss something
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi @kartik-v ,
I was looking into the size of the mpdf library and discovered that about 30Mb can be removed from the download file by removing the iccprofiles/CMYK directory.
The developer has removed these from the latest version. Would you like me to fork and send a pull request? Or would you like to leave it as is for now?
Cheers,
Tom
Extracting messages from ←[0m←[36mC:\xampp\htdocs\cis.wkt\vendor\kartik-v\mpdf\m
pdf.php←[0m...
PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 1
34217728 bytes exhausted (tried to allocate 36 bytes)'
in C:\xampp\htdocs\cis.wkt\vendor\yiisoft\yii2\console\controllers\MessageContro
ller.php:287
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.