feat: add crop marks variant for print finishing
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 24s
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 24s
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Has been cancelled
This commit is contained in:
@@ -143,7 +143,26 @@ END:VCARD`;
|
||||
const gsNoTruckCommand = `gs -dNoOutputFonts -sDEVICE=pdfwrite -o "${finalNoTruckPath}" "${tempNoTruckPath}"`;
|
||||
execSync(gsNoTruckCommand, { stdio: 'inherit' });
|
||||
fs.unlinkSync(tempNoTruckPath);
|
||||
console.log(`✓ No Truck Print File generated: ${noTruckFileName}`);
|
||||
// 4. CROP MARKS PDF (RGB)
|
||||
console.log(`- Rendering Crop Marks Variant (RGB)...`);
|
||||
const cropMarksFileName = `KLZ_Visitenkarte_${safeName}_CropMarks.pdf`;
|
||||
const tempCropMarksPath = path.join(CONFIG.outputDir, `temp_${cropMarksFileName}`);
|
||||
const finalCropMarksPath = path.join(CONFIG.outputDir, cropMarksFileName);
|
||||
|
||||
buffer = await renderToBuffer(
|
||||
React.createElement(PDFBusinessCard, {
|
||||
person,
|
||||
qrCodeDataUrl,
|
||||
variant: 'blue',
|
||||
isViaprinto: false,
|
||||
withCropMarks: true,
|
||||
}),
|
||||
);
|
||||
fs.writeFileSync(tempCropMarksPath, buffer);
|
||||
const gsCropMarksCommand = `gs -dNoOutputFonts -sDEVICE=pdfwrite -o "${finalCropMarksPath}" "${tempCropMarksPath}"`;
|
||||
execSync(gsCropMarksCommand, { stdio: 'inherit' });
|
||||
fs.unlinkSync(tempCropMarksPath);
|
||||
console.log(`✓ Crop Marks Print File generated: ${cropMarksFileName}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user