Document: Overwrite any other file in SaveTo()

This commit is contained in:
2024-02-29 16:13:28 +01:00
parent f922388db9
commit e693f83152

View File

@ -133,7 +133,7 @@ namespace Elwig.Documents {
public void SaveTo(string pdfPath) { public void SaveTo(string pdfPath) {
if (PdfPath == null) throw new InvalidOperationException("Pdf file has not been generated yet"); if (PdfPath == null) throw new InvalidOperationException("Pdf file has not been generated yet");
File.Copy(PdfPath, pdfPath); File.Copy(PdfPath, pdfPath, true);
} }
public async Task Print(int copies = 1) { public async Task Print(int copies = 1) {