Giter VIP home page Giter VIP logo

Comments (3)

ceeram avatar ceeram commented on May 14, 2024

IIRC external css is ont supported by tcpdf.

2014-07-19 11:55 GMT+02:00 cttech [email protected]:

I have used configuration like
Configure::write('CakePdf', array(
'engine' => 'CakePdf.Tcpdf',
'options' => array(
'print-media-type' => true,
'outline' => true,
'dpi' => 96
),
'margin' => array(
'bottom' => 15,
'left' => 50,
'right' => 30,
'top' => 45
),
'orientation' => 'portrait',
'download' => true,
'permission' => true
));

After then I have added css with view file
echo $this->Html->css('company', array('fullBase' => true));

I have checked normal view and it's fine but when I am downloading pdf no
css works!!


Reply to this email directly or view it on GitHub
#65.

from cakepdf.

cttech avatar cttech commented on May 14, 2024

If I use Mpdf then I get the following warning and pdf is not generated..

Notice (8): Undefined index: BODY [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14242]
Notice (8): Undefined index: BODY>>ID>> [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14288]
Notice (8): Undefined offset: -1 [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14421]
Notice (8): Undefined index: DIV [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14242]
Notice (8): Undefined index: CLASS>>MAIN-CONTENT [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14245]
Notice (8): Undefined index: ID>>MAIN-CONTENT [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14280]
Notice (8): Undefined index: DIV>>CLASS>>MAIN-CONTENT [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14284]
Notice (8): Undefined index: DIV>>ID>>MAIN-CONTENT [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14288]
Notice (8): Undefined index: DIV [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14242]
..................................................................................................................................................
..................................................................................................................................................

One the other hand if I use DomPdf then css is not working as like Tcpdf.

from cakepdf.

ceeram avatar ceeram commented on May 14, 2024

Hence the advised engine is wkhtlm2pdf, although other engines should work
with the mentioned limitation of external css
Op 19 jul. 2014 17:09 schreef "cttech" [email protected]:

If I use Mpdf then I get the following warning and pdf is not generated..

Notice (8): Undefined index: BODY
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14242]
Notice (8): Undefined index: BODY>>ID>>
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14288]
Notice (8): Undefined offset: -1 [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php,
line 14421]
Notice (8): Undefined index: DIV [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php,
line 14242]
Notice (8): Undefined index: CLASS>>MAIN-CONTENT
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14245]
Notice (8): Undefined index: ID>>MAIN-CONTENT
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14280]
Notice (8): Undefined index: DIV>>CLASS>>MAIN-CONTENT
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14284]
Notice (8): Undefined index: DIV>>ID>>MAIN-CONTENT
[APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php, line 14288]
Notice (8): Undefined index: DIV [APP\Plugin\CakePdf\Vendor\mpdf\mpdf.php,
line 14242]

..................................................................................................................................................

..................................................................................................................................................

One the other hand if I use DomPdf then css is not working as like Tcpdf.
I am not sure how can I generate proper pdf...


Reply to this email directly or view it on GitHub
#65 (comment).

from cakepdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.