Our state of the art Gantt chart


Post by capmo »

The export paper sizes seem to be fixed.

// gantt.module.js
const PaperFormat = {
  A6: {
    width: 4.13,
    height: 5.81
  },
  A5: {
    width: 5.81,
    height: 8.25
  },
  A4: {
    width: 8.25,
    height: 11.69
  },
  A3: {
    width: 11.69,
    height: 16.49
  },
  Legal: {
    width: 8.5,
    height: 14
  },
  Letter: {
    width: 8.5,
    height: 11
  }
};

Is there a way to extend this list so that we can provide custom sizes? If not, do you and when you plan to enable this functionality?


Post by Maxim Gorkovsky »

Hello.
There is a feature request to implement it: https://github.com/bryntum/support/issues/182

You can try adding more paper formats to the PaperFormat object:

import { PaperFormat } from 'Utils'
PaperFormat.my = { width : 10, height: 10 } // size should be in inches

But then you'd have to pass arguments to the server too, which is not supported yet. See PdfExport#export method and processPageIntoPdfBuffer of the server/src/queue.js, you can find a way to override this (or patch)


Post by capmo »

Thanks @maxim! :)


Post by capmo »

Just a question - where the Utils come from?

import { PaperFormat } from 'Utils'

It doesn't exist in import { ProjectModel, Tooltip, } from 'bryntum-gantt'; @maxim


Post by alex.l »

Hi capmo, try this:

import { PaperFormat } from 'bryntum-gantt';

All the best,
Alex


Post Reply