public int ByteSize() { var size = ByteSizes.Size(FirstObjectNumber); size += ByteSizes.Size(ObjectCount); size += 3; // 1 space + CR LF size += ObjectCount * 20; return(size); }
/// <summary> /// Write a <see cref="long"/> to the stream /// </summary> /// <param name="value">The long to write</param> /// <returns>The calling <see cref="PdfStream"/> to support chaining operations.</returns> public PdfStream Write(long value) { var intSize = ByteSizes.Size(value); for (int i = intSize - 1; i >= 0; i--) { var result = (byte)('0' + ((int)(value / Math.Pow(10, i)) % 10)); InnerStream.WriteByte(result); } return(this); }