refactor(pdfengines): embeds => attachments

This commit is contained in:
Julien Neuhart
2026-03-08 15:49:09 +01:00
parent 7af3cd1ff5
commit cf9fd7eedc
92 changed files with 5763 additions and 3082 deletions

View File

@@ -31,7 +31,7 @@ func convertRoute(libreOffice libreofficeapi.Uno, engine gotenberg.PdfEngine) ap
pdfFormats := pdfengines.FormDataPdfFormats(form)
metadata := pdfengines.FormDataPdfMetadata(form, false)
userPassword, ownerPassword := pdfengines.FormDataPdfEncrypt(form)
embedPaths := pdfengines.FormDataPdfEmbeds(form)
attachmentsPaths := pdfengines.FormDataPdfAttachments(form)
zeroValuedSplitMode := gotenberg.SplitMode{}
@@ -253,9 +253,9 @@ func convertRoute(libreOffice libreofficeapi.Uno, engine gotenberg.PdfEngine) ap
}
}
err = pdfengines.EmbedFilesStub(ctx, engine, embedPaths, outputPaths)
err = pdfengines.AddAttachmentsStub(ctx, engine, attachmentsPaths, outputPaths)
if err != nil {
return fmt.Errorf("embed files into PDFs: %w", err)
return fmt.Errorf("add attachments into PDFs: %w", err)
}
err = pdfengines.WriteMetadataStub(ctx, engine, metadata, outputPaths)