Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14296

pdf paper size error on localised civicrm

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.4.4
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Funding Source:
      Needs Funding

      Description

      This one was a tricky one, finally solved by sylvain from wikimedia france:

      • dompdf expects dimension units to be in pts,
      • when doing the conversion from mm to pts, you end up with numbers that aren't round ones, eg A4 paper size is 595.28 x 841.89
      • however the conversion (on a french civicrm returns 595,28 instead of 595.28 (ie. comma instead of dot as the decimal separator)
      • dompdf choke on that one and ends up with weird numbers, that go all crazy when resized (at least using wkhtmltopdf)

      Solution is to search replace , by .
      Probably better to not localize when dealing with page units, but a more risky change and given that we are working this week-end to fix crappy tax receipts that we have sent to all the donors last week and resend them, we kept it simple

      X+

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              xavier xavier dutoit
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: