/// <summary> /// Toes the PDF. /// </summary> /// <param name="writer">The writer.</param> public void ToPdf(PdfWriter writer) { PdfArray array2 = new PdfArray(); PdfString item = new PdfString(Guid.NewGuid().ToString()) { IsHexMode = true }; array2.Add(item); PdfString str2 = new PdfString(Guid.NewGuid().ToString()) { IsHexMode = true }; array2.Add(str2); PdfArray array = array2; this.dic[PdfName.ID] = array; PdfStreamWriter psw = writer.Psw; psw.WriteLineEnd(); psw.WriteBytes(trailer).WriteLineEnd(); writer.WriteObject(this.dic); psw.WriteLineEnd(); psw.WriteBytes(startxref).WriteLineEnd(); psw.WriteInt(this.Offset).WriteLineEnd(); psw.WriteBytes(eof).WriteLineEnd(); }
/// <summary> /// Writes the cross block. /// </summary> /// <param name="index">The index.</param> /// <param name="count">The count.</param> /// <param name="psw">The PSW.</param> private void WriteCrossBlock(int index, int count, PdfStreamWriter psw) { psw.WriteInt(base[index].ObjectIndex).WriteSpace().WriteInt(count); for (int i = index; i < count; i++) { psw.WriteLineEnd(); psw.WriteString(((long)base[i].Offset).ToString("0000000000", CultureInfo.InvariantCulture.NumberFormat)); psw.WriteSpace(); psw.WriteString(((int)base[i].Generation).ToString("00000", CultureInfo.InvariantCulture.NumberFormat)); psw.WriteSpace(); psw.WriteByte(base[i].InUse ? nf[0] : nf[1]); } }