feat: support selective page range extraction for email attachment print previews
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
This commit is contained in:
@@ -50,8 +50,8 @@ export const emailImportApi = {
|
||||
await api.post('/api/email-import/belegnummer/release', { date: dateStr, number });
|
||||
},
|
||||
|
||||
printPreview: async (attachmentId: number, barcodeData: any): Promise<Blob> => {
|
||||
const res = await api.post(`/api/email-import/attachments/${attachmentId}/print-preview`, barcodeData, {
|
||||
printPreview: async (attachmentId: number, barcodeData: any, pages?: { start: number; end: number }): Promise<Blob> => {
|
||||
const res = await api.post(`/api/email-import/attachments/${attachmentId}/print-preview`, { ...barcodeData, _pages: pages }, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
return res.data;
|
||||
|
||||
@@ -365,8 +365,11 @@ export default function MailImportWizard({ visible, onClose, email, attachments
|
||||
printWindow.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const blob = await emailImportApi.printPreview(attachmentId, barcode);
|
||||
|
||||
const item = importData.find(i => i.virtualId === virtualId);
|
||||
const pages = item?.pages;
|
||||
|
||||
const blob = await emailImportApi.printPreview(attachmentId, barcode, pages);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
|
||||
// Navigate the already open window to the PDF
|
||||
|
||||
Reference in New Issue
Block a user