CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • PDF receipts - size matters - default to Landscape?
Pages: [1]

Author Topic: PDF receipts - size matters - default to Landscape?  (Read 3525 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
PDF receipts - size matters - default to Landscape?
November 07, 2010, 03:26:32 pm
On Demo. Find Contributions, then Print or Email Contribution Receipt. Choose PDF.

The receipt is extends beyond the right hand margin - maybe due to being Landscape? Not so obvious on Demo but in our case the Orgs Name and Address are aligned right in the System Templates, and therefore is missing some of the copy.

If so is this similar to this issue? http://issues.civicrm.org/jira/browse/CRM-5221

I also note some work was being done to add such settings to UI here - http://forum.civicrm.org/index.php/topic,15419.15.html
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: PDF receipts - size matters - default to Landscape?
November 07, 2010, 10:40:59 pm
The problem is in the system workflow template.  The main table has width="620" which renders wider than 8.5 inches.  Try editing the workflow template and change the main table width to something like width="6in".

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: PDF receipts - size matters - default to Landscape?
November 07, 2010, 10:53:34 pm
ahh- okay thanks - will look at that. also had this from lobo - which was a patch he said was required - http://paste2.org/p/1078605

we also discussed the issue that seems that to change to A4 it is important to put that in lower case ie a4 not A4.

Haven't tested yet - but thanks for your suggestion too.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: PDF receipts - size matters - default to Landscape?
November 14, 2010, 06:45:38 pm
This issue sprawled on to this one so am trying to get it all back on to one thread - my bad - http://forum.civicrm.org/index.php/topic,16563.msg70735.html#msg70735

So various patches later - the outcome is the same - and Marty is correct in that reducing the width of the table in the Systems Tpl helps - though it doesn't deal with what i think is an underlying issue with the way the code is being applied in the PDF.

Dropping the table width to 600 results in the entire 'copy' showing on the PDF, but both edges get trimmed when we print (this was on A4) - so maybe this is still the A4 v Letter issue. But when I drop the size even more it still loses bit on the left - so maybe an issue about domPDF not thinking about margins?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: PDF receipts - size matters - default to Landscape?
November 15, 2010, 12:57:40 am
Out of curiosity, do you use A4 down south ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: PDF receipts - size matters - default to Landscape?
November 15, 2010, 01:36:58 am
aye we doo
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: PDF receipts - size matters - default to Landscape?
April 27, 2011, 04:26:31 pm
The table width attribute in the template is specified as '620' which is measured in pixels.  The DOMPDF package used to create the PDF file treats pixels the same as points, so since there are 72pt/in then the table width is 620/72 = 8.6 inches.  The page size used to create the PDF is 8.5x11, so the table is too wide to fit.

The ultimate fix is to change the workflow templates and set the table width to something like '7in' or '100%'.

I've submitted new code to allow configurable PDF page formats that can be assigned to message templates (CRM-7981).  Once this is implemented (3.4.2?) it will also be possible to change the paper size or set the orientation to landscape to fit the table.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: PDF receipts - size matters - default to Landscape?
April 27, 2011, 07:17:10 pm
you are awesome - thanks for updating this thread
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • PDF receipts - size matters - default to Landscape?

This forum was archived on 2017-11-26.