Giter VIP home page Giter VIP logo

Comments (3)

raykolbe avatar raykolbe commented on July 19, 2024

If I understand you correctly, you'd like to use your own instance of DOMPDF in DOMPDFModule?

Would it make more sense to change the DOMPDF package (https://github.com/raykolbe/dompdf) to incorporate a DOMPDF service here? This would allow consumers the ability to use just the DOMPDF package without relying on Zend\View and everything that comes with that.

from dompdfmodule.

raykolbe avatar raykolbe commented on July 19, 2024

I have added support for specifying paper size, paper orientation, and base path on an individual PdfModel instance basis.

This is as of commit b77aa55.

You can accomplish this by returning PdfModel such as:

        return new PdfModel(
            array('model' => $model),
            array(
                'paperSize'         => 'a4',
                'paperOrientation'  => 'landscape',
                'basePath'          => '/'
            )
        );

or you can manually call setPaperSize, setPaperOrientation, setBasePath on PdfModel before returning it.

Can you elaborate a little more as to why you use utf8_decode($html)?

from dompdfmodule.

juriansluiman avatar juriansluiman commented on July 19, 2024

@raykolbe thanks for the modifications, great! Whether this would suit best in the DomPdf module or this module, I don't know but I think this fix is good enough.

Re utf-8: we had many problems with Unicode support in previous versions of DomPdf. The code was a simple copy/paste, but in the latest DomPdf versions there is a proper fix for this. So don't bother that ;)

from dompdfmodule.

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.