internal long WriteXref(SerializationResult serializeResult) { var position = this.Position; var xrefTable = new XrefTable(); foreach (var offset in serializeResult.Offsets) { xrefTable.Add(offset, new IndirectReference(0, 0)); } this.iSer.SerializeXrefTable(this, xrefTable); return(position); }
public void SetAndGetXrefTableAsXrefTableType() { string table = "TableName".RandomString(4); SchemaManager sm = new SchemaManager(); sm.SetSchema("test_schema".RandomString(4)); sm.AddXref("Left", "Right"); SchemaManager sm2 = new SchemaManager(); sm2.SetSchema(sm.CurrentSchema.Name); Table t = sm2.GetXref("LeftRight"); Expect.IsNotNull(t); XrefTable x = t as XrefTable; Expect.IsNotNull(x); Expect.AreEqual("Left", x.Left); Expect.AreEqual("Right", x.Right); }
public void SerializeXrefTable(PdfWriter writer, XrefTable xrefTable) { writer.WriteLine(PdfTokens.Xref); SerdesFactory.GetFor(xrefTable).Serialize(writer, xrefTable, null); }