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 CiviEvent (Moderator: Yashodha Chaku) »
  • New label size for badge and landscape orientation
Pages: [1]

Author Topic: New label size for badge and landscape orientation  (Read 656 times)

nant

  • I post frequently
  • ***
  • Posts: 143
  • Karma: 4
    • Joomlapolis
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5.11
  • MySQL version: 5
  • PHP version: 5.3
New label size for badge and landscape orientation
April 14, 2013, 10:56:48 am
I am struggling to create a new badge template for events.

Ideally I would like to define my own page size and specify landscape orientation.

Looking at the examples here:

http://wiki.civicrm.org/confluence/display/CRMDOC41/Name+Badge+Administration,+Customization

I cannot see how to handle non standard paper-size or landscape orientation.

Any assistance kindly appreciated.
--
Nick (aka nant from CB Team)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: New label size for badge and landscape orientation
April 14, 2013, 11:24:02 am
for landscape, look at the nametent orientation

for the non standard size, might be easier to define an existing one and set the margins accordingly?

Otherwise, you'll need to check the source code of the pdf package used, hopefully you'll find a way

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

nant

  • I post frequently
  • ***
  • Posts: 143
  • Karma: 4
    • Joomlapolis
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5.11
  • MySQL version: 5
  • PHP version: 5.3
Re: New label size for badge and landscape orientation
April 14, 2013, 11:42:02 am
Quote from: xavier on April 14, 2013, 11:24:02 am
for landscape, look at the nametent orientation

for the non standard size, might be easier to define an existing one and set the margins accordingly?

Otherwise, you'll need to check the source code of the pdf package used, hopefully you'll find a way

X+

Thanks for replying.

I did find this in the nametent php file:

 function pdfExtraFormat() {
    $this->pdf->setPageFormat('A4', 'L');
  }

However I also tried this and it appears to work:

    $this->format = array(
      'name' => 'Avery 5395', 'paper-size' => 'C8', 'metric' => 'mm', 'lMargin' => 1,
      'tMargin' => 1, 'NX' => 1, 'NY' => 1, 'SpaceX' => 0, 'SpaceY' => 0,
      'width' => $w, 'height' => $h, 'font-size' => 12, 'orientation' => 'landscape'
    );

Question of adding my own paper size still open.
--
Nick (aka nant from CB Team)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • New label size for badge and landscape orientation

This forum was archived on 2017-11-26.