async-pdf
Version:
Create, Modify and Merge PDF Files
18 lines (17 loc) • 531 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PDFVerticalAlignmentFormatter = void 0;
function PDFVerticalAlignmentFormatter(align, position, size) {
switch (align) {
case 'center':
position = position - (size / 2);
break;
case 'left': break;
case 'right':
position = position - size;
break;
default: break;
}
return position;
}
exports.PDFVerticalAlignmentFormatter = PDFVerticalAlignmentFormatter;