diff --git a/.gitignore b/.gitignore
index ef5f1b7f..9047075d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,7 @@ bld/
[Bb]in/
[Oo]bj/
-# Visual Studo 2015 cache/options directory
+# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
@@ -90,7 +90,7 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
-# JustCode is a .NET coding addin-in
+# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
@@ -129,7 +129,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
diff --git a/src/PdfSharp/Pdf/PdfDocument.cs b/src/PdfSharp/Pdf/PdfDocument.cs
index fe1b9af5..7995c6d1 100644
--- a/src/PdfSharp/Pdf/PdfDocument.cs
+++ b/src/PdfSharp/Pdf/PdfDocument.cs
@@ -462,17 +462,9 @@ internal override void PrepareForSave()
if (info.Elements[PdfDocumentInformation.Keys.Creator] == null)
info.Creator = pdfSharpProducer;
- // Keep original producer if file was imported.
- string producer = info.Producer;
- if (producer.Length == 0)
- producer = pdfSharpProducer;
- else
- {
- // Prevent endless concatenation if file is edited with PDFsharp more than once.
- if (!producer.StartsWith(VersionInfo.Title))
- producer = pdfSharpProducer + " (Original: " + producer + ")";
- }
- info.Elements.SetString(PdfDocumentInformation.Keys.Producer, producer);
+ // Set Producer if value is undefined
+ if (info.Elements[PdfDocumentInformation.Keys.Producer] == null)
+ info.Producer = VersionInfo.Producer;
// Prepare used fonts.
if (_fontTable != null)
diff --git a/src/PdfSharp/Pdf/PdfDocumentInformation.cs b/src/PdfSharp/Pdf/PdfDocumentInformation.cs
index 11149571..e8d6ae49 100644
--- a/src/PdfSharp/Pdf/PdfDocumentInformation.cs
+++ b/src/PdfSharp/Pdf/PdfDocumentInformation.cs
@@ -93,11 +93,12 @@ public string Creator
}
///
- /// Gets the producer application (for example, PDFsharp).
+ /// Gets or sets the name of the producer application (for example, PDFsharp).
///
public string Producer
{
get { return Elements.GetString(Keys.Producer); }
+ set { Elements.SetString(Keys.Producer, value); }
}
///