diff --git a/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfString.cs b/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfString.cs
index eccb3cae..36a8920c 100644
--- a/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfString.cs
+++ b/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfString.cs
@@ -284,7 +284,21 @@ static bool IsRawEncoding(string s)
///
internal override void WriteObject(PdfWriter writer)
{
+ PositionStart = writer.Position;
+
writer.Write(this);
+
+ PositionEnd = writer.Position;
}
+
+ ///
+ /// Position of the first byte of this string in PdfWriter's Stream
+ ///
+ public int PositionStart { get; internal set; }
+
+ ///
+ /// Position of the last byte of this string in PdfWriter's Stream
+ ///
+ public int PositionEnd { get; internal set; }
}
}