UNPKG

handgen

Version:

Handout Generator package that has a Handout class that exposes a createHandout method for generating handout pdfs from jpg, png and/or pdf. https://www.npmjs.com/package/handgen

41 lines (33 loc) 1.13 kB
import { lWidth, lHeight } from '@/others/constants'; import { createPicture } from '@/defaults/functions'; import { pic_width, pic_height } from '@/defaults/FourPicture/fourPicture'; import { Template } from '@/others/types'; const pic_width_modified = pic_width * 1.25; const pic_height_modified = pic_height * 1.25; const pic_x1 = 75; const pic_x2 = lWidth - pic_x1 - pic_width_modified; const pic_y2 = 40; const pic_y1 = lHeight - pic_y2 - pic_height_modified; export const d4_print_landscape: Template = { id: 'FourScapeNothing', name: 'Default 4 Print Landscape', pages: [ { pageN: { x: lWidth - 50, y: 30, size: 12, }, dim: [lWidth, lHeight], fields: [], pictures: [ // y1 > y2 createPicture(pic_x1, pic_y1, pic_width_modified, pic_height_modified), createPicture(pic_x2, pic_y1, pic_width_modified, pic_height_modified), createPicture(pic_x1, pic_y2, pic_width_modified, pic_height_modified), createPicture(pic_x2, pic_y2, pic_width_modified, pic_height_modified), ], lines: [], }, ], };