Closed mneuhaus closed 10 years ago
Hi Marc,
Thanks for this email. I didn't know this was possible. Therefore I extended your class with my own class and created new functions in my own class where the format was set in the download function. Good to know that it is possible to use the parameters in the constructor.
I am not using twitter anymore so a while ago I have deleted my @markyourweb and my private twitter account.
Kind regards,
Mark Kuiphuis
Sent from my iPad
On 7 Jul 2014, at 8:48 pm, mneuhaus notifications@github.com wrote:
It should be possible to create different page sizes and orientations like this:
// A3 landscape $document = new \Famelo\PDF\Document('My.Package:SomeDocument', 'A3-L');
// A3 portrait $document = new \Famelo\PDF\Document('My.Package:SomeDocument', 'A3');
// Letter portrait $document = new \Famelo\PDF\Document('My.Package:SomeDocument', 'Letter');
// 190mm x 236mm $document = new \Famelo\PDF\Document('My.Package:SomeDocument', array(190, 236)); ...
The MPDF library supports different page sizes with these keywords or an array containing 2 values for width + height:
A0 - A10, B0 - B10, C0 - C10 4A0, 2A0, RA0 - RA4, SRA0 - SRA4 Letter, Legal, Executive, Folio Demy, Royal A (Type A paperback 111x178mm) B (Type B paperback 128x198mm) Ledger, Tabloid*
All of the above values can be suffixed with "-L" to force a Landscape page orientation document e.g. "A4-L". If format is defined as a string, the final orientation parameter will be ignored.
*Ledger and Tabloid are standard formats with the same page size but different orientation (Ledger is landscape, and Tabloid is portrait). mPDF treats these identically; if you wish to use Ledger, you should specify "Ledger-L" for landscape.
cc @markyourweb https://github.com/markyourweb is this something that you're missing? :)
source: http://forum.typo3.org/index.php?t=tree&th=204714&goto=714292&#msg_714292
— Reply to this email directly or view it on GitHub https://github.com/mneuhaus/Famelo.PDF/issues/6.
it's not possible in Famelo.PDF yet, but i could implement it this way, just curious, if it would help your usecase ? :)
It would, but at the moment it is working and I doubt if I get any more different document sizes. I suppose we could as we are currently generating PDF reports in A4 landscape, A4 portrait, but also a custom format fir printing stickers with one of thos Brother label printers. There is a change that future clients will use different label sizes.....
But don' build it specifically for me :) I can't be the only one using your package....
Cheers, Mark
Sent from my iPad
On 7 Jul 2014, at 9:12 pm, mneuhaus notifications@github.com wrote:
it's not possible in Famelo.PDF yet, but i could implement it this way, just curious, if it would help your usecase ? :)
— Reply to this email directly or view it on GitHub https://github.com/mneuhaus/Famelo.PDF/issues/6#issuecomment-48166113.
well, 123 installs from packagist, so some seem to be using it :)
I'll implement this then, is no big or breaking change anyway ;)
It should be possible to create different page sizes and orientations like this:
The MPDF library supports different page sizes with these keywords or an array containing 2 values for width + height:
cc @markyourweb is this something that you're missing? :)
source: http://forum.typo3.org/index.php?t=tree&th=204714&goto=714292&#msg_714292