Comments (3)
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.
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.
@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)
- cant install via composer HOT 2
- Options for setOptions? HOT 1
- Manual setup guide HOT 2
- 0.3.1 Has dependency problem HOT 2
- How to generate pdf files on server side HOT 4
- enable_remote HOT 1
- Example code HOT 1
- DOMPdf wouldn't work on my Linux box HOT 4
- Need a new tag HOT 3
- Output is not aligned properly HOT 5
- Call to undefined method Zend\Mvc\View\Http\ViewManager::getResolver() HOT 12
- Fatal error HOT 2
- PHP7 compatibility (update composer to dompdf 0.7.0)? HOT 3
- Does this work with ZF3? HOT 3
- zend-console dependency breaks existing code HOT 8
- Can't include project images or css
- how to add custom fonts for verson 0.7.0??
- How To: Get DOMPDFModule working with ZF3 HOT 3
- Create a tag @ #a2e2e15 HOT 1
- Setting ZF Name in Readme.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dompdfmodule.