import { buildCommandSequence, getCommand, } from '../../../../code/tool/shared/command.js';
import { CropPdfWithPdfCropModel, } from '../../../../code/type/index.js';
export async function cropPdfWithPdfCropNode(source) {
    const input = CropPdfWithPdfCropModel.parse(source);
    const command = getCommand('pdfcrop');
    if (input.margin != null) {
        command.link.push(`-margin`, String(input.margin));
    }
    command.link.push(input.input.file.path);
    command.link.push(input.output.file.path);
    return buildCommandSequence(command);
}
//# sourceMappingURL=node.js.map