public override void BeginArrayEntry() { if (FinishedEntry) { CurrentStream.Write(Constants.ArrayEntrySeparator); } this.FinishedEntry = false; }
/// <summary> /// Writes a boolean value to the current stream /// </summary> /// <param name="value"></param> public override void WriteBoolean(bool value) { if (value) { CurrentStream.Write("true"); } else { CurrentStream.Write("false"); } }
public override void BeginDictionaryEntry(string name) { if (FinishedEntry) { CurrentStream.Write(Constants.DictionaryNameValueSeparator); } FinishedEntry = false; CurrentStream.Write(Constants.StartName); CurrentStream.Write(ValidateName(name)); CurrentStream.Write(Constants.WhiteSpace); }
public override void WriteStringLiteral(string value, Scryber.FontEncoding encoding) { if (UseHex && encoding != FontEncoding.PDFDocEncoding) { //TODO Write encoding prefix CurrentStream.Write(Constants.StartHexString); value = ToHex(value, encoding); CurrentStream.Write(value); CurrentStream.Write(Constants.EndHexString); } else { Scryber.Text.PDFEncoding enc = Scryber.Text.PDFEncoding.GetEncoding(encoding); CurrentStream.Write(Constants.StartString); if (null != enc.Prefix && enc.Prefix.Length > 0) { CurrentStream.Write(enc.Prefix); } CurrentStream.Write(enc.GetBytes(value)); CurrentStream.Write(Constants.EndString); } }
public void Write(byte[] buffer) { CurrentStream.Write(buffer, 0, buffer.Length); }
public void Write(byte[] buffer, int offset, int count) { CurrentStream.Write(buffer, offset, count); }
/// <summary> /// Writes a PDFName string to the current stream /// </summary> /// <param name="name"></param> public override void WriteName(string name) { CurrentStream.Write(Constants.StartName); CurrentStream.Write(ValidateName(name)); }
/// <summary> /// Writes a real value to the current stream /// </summary> /// <param name="value"></param> public override void WriteReal(float value) { CurrentStream.Write(value.ToString("F", System.Globalization.CultureInfo.InvariantCulture)); }
/// <summary> /// Writes a long value to the current stream /// </summary> /// <param name="value"></param> public override void WriteNumber(long value) { CurrentStream.Write(value.ToString()); }
public override void WriteStringHex(byte[] value) { CurrentStream.Write(Constants.StartHexString); CurrentStream.Write(ToHex(value)); CurrentStream.Write(Constants.EndHexString); }
public override void WriteByteString(string byteString) { CurrentStream.Write(Constants.StartHexString); CurrentStream.Write(byteString); CurrentStream.Write(Constants.EndHexString); }
public override void EndArray() { this.FinishedEntry = false; CurrentStream.Write(Constants.EndArray); }
public override void EndArrayEntry() { CurrentStream.Write(Constants.ArrayEntrySeparator); }
public override void BeginArray() { CurrentStream.Write(Constants.StartArray); this.FinishedEntry = false; }
public override void BeginDictionary() { CurrentStream.Write(Constants.StartDictionary); this.FinishedEntry = false; }