PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

PdfSharp.Pdf.PdfDocument.Save() » without argument
https://forum.pdfsharp.net/viewtopic.php?f=4&t=1367
Page 1 of 1

Author:  Toms [ Thu Oct 07, 2010 5:00 pm ]
Post subject:  PdfSharp.Pdf.PdfDocument.Save() » without argument

Hello

Thanks a lot for this great library!, I downloaded it some minutes ago - and already have a working tool...

I noticed, that we can define a Filename in PdfDocument's constructor -
and then it's needless to be forced to define a filename again in the Save() function.

Maybe it would be useful if null or string.empty is passed and PdfDocument
already has a filename, then this filename is ised.

Kind regards,
Thomas

Author:  Toms [ Fri Oct 08, 2010 9:01 am ]
Post subject:  Re: PdfSharp.Pdf.PdfDocument.Save() » without argument

Hello

I have noticed, that PdfDocument's constructor with a file argument and
PdfDocument.Save() with the same filename behaves strange: the exception
'the file is used by another process' is thrown.

I think this is one more reason for supporting PdfDocument.Save() command
without an argument, which just saves the file passed in the constructor.

Kind regards,
Thomas

Author:  Thomas Hoevel [ Mon Oct 11, 2010 7:12 am ]
Post subject:  Re: PdfSharp.Pdf.PdfDocument.Save() » without argument

Hi, Thomas,

I put this issue onto our bug list, should be fixed with the next release.

Author:  Thomas Hoevel [ Wed Nov 12, 2014 4:00 pm ]
Post subject:  Re: PdfSharp.Pdf.PdfDocument.Save() » without argument

Hi, Thomas, all!
Toms wrote:
I noticed, that we can define a Filename in PdfDocument's constructor -
and then it's needless to be forced to define a filename again in the Save() function.
Late reply: it's not a bug, it's a feature.

When you pass a filename or a stream to the constructor, just call Close() when you are done and the document will be saved - to the file or the stream.
I think there won't be a "Save()" without parameters.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/