public void WriteGStateObject(TPdfStream DataStream, TXRefSection XRef) { XRef.SetObjectOffset(GStateObjId, DataStream); TIndirectRecord.SaveHeader(DataStream, GStateObjId); TDictionaryRecord.BeginDictionary(DataStream); TDictionaryRecord.SaveKey(DataStream, TPdfToken.TypeName, TPdfTokens.GetString(TPdfToken.ExtGStateName)); TDictionaryRecord.SaveKey(DataStream, Operator, PdfConv.CoordsToString(Alpha / 255.0)); if (SMask != null) { SMaskObjId = XRef.GetNewObject(DataStream); TDictionaryRecord.WriteLine(DataStream, TPdfTokens.GetString(TPdfToken.SMaskName)); TDictionaryRecord.BeginDictionary(DataStream); TDictionaryRecord.SaveKey(DataStream, TPdfToken.TypeName, TPdfTokens.GetString(TPdfToken.MaskName)); TDictionaryRecord.SaveKey(DataStream, TPdfToken.SName, TPdfTokens.GetString(TPdfToken.AlphaName)); TDictionaryRecord.Write(DataStream, TPdfTokens.GetString(TPdfToken.GName) + " "); TIndirectRecord.CallObj(DataStream, SMaskObjId); TDictionaryRecord.EndDictionary(DataStream); } TDictionaryRecord.EndDictionary(DataStream); TIndirectRecord.SaveTrailer(DataStream); if (SMask != null) { WriteSMaskObject(DataStream, XRef); } }
public static int WriteColorSpace(TPdfStream DataStream, TXRefSection XRef) { int Result = XRef.GetNewObject(DataStream); TPdfBaseRecord.Write(DataStream, TPdfTokens.GetString(TPdfToken.PatternColorSpacePrefix) + " "); TIndirectRecord.CallObj(DataStream, Result); return(Result); }
private void SaveKids(TPdfStream DataStream, TXRefSection XRef) { WriteLine(DataStream, TPdfTokens.GetString(TPdfToken.KidsName) + " " + TPdfTokens.GetString(TPdfToken.OpenArray)); for (int i = 0; i < FList.Count; i++) { TIndirectRecord.CallObj(DataStream, FList[i].Id); } WriteLine(DataStream, TPdfTokens.GetString(TPdfToken.CloseArray)); }
public void WriteImage(TPdfStream DataStream, TXRefSection XRef) { TPdfBaseRecord.Write(DataStream, TPdfTokens.GetString(TPdfToken.ImgPrefix) + Id.ToString(CultureInfo.InvariantCulture) + " "); ImgObjId = XRef.GetNewObject(DataStream); TIndirectRecord.CallObj(DataStream, ImgObjId); if (FSMask != null) { SMaskId = XRef.GetNewObject(DataStream); } }
public static void BeginSave(TPdfStream DataStream, int LengthId, bool Compress, int Length1) { TDictionaryRecord.BeginDictionary(DataStream); Write(DataStream, TPdfTokens.GetString(TPdfToken.LengthName) + " "); TIndirectRecord.CallObj(DataStream, LengthId); if (Length1 >= 0) { WriteLine(DataStream, TPdfTokens.GetString(TPdfToken.Length1Name) + " " + Length1.ToString(CultureInfo.InvariantCulture)); } if (Compress) { SetFlateDecode(DataStream); } TDictionaryRecord.EndDictionary(DataStream); BeginSave(DataStream); }
public void WritePattern(TPdfStream DataStream, TXRefSection XRef) { TPdfBaseRecord.Write(DataStream, TPdfTokens.GetString(PatternPrefix) + PatternId.ToString(CultureInfo.InvariantCulture) + " "); PatternObjId = XRef.GetNewObject(DataStream); TIndirectRecord.CallObj(DataStream, PatternObjId); }
public void WriteGState(TPdfStream DataStream, TXRefSection XRef) { TPdfBaseRecord.Write(DataStream, GStateName + " "); GStateObjId = XRef.GetNewObject(DataStream); TIndirectRecord.CallObj(DataStream, GStateObjId); }
public virtual void WriteFont(TPdfStream DataStream, TXRefSection XRef) { TPdfBaseRecord.Write(DataStream, TPdfTokens.GetString(TPdfToken.FontPrefix) + Id.ToString(CultureInfo.InvariantCulture) + " "); FontObjId = XRef.GetNewObject(DataStream); TIndirectRecord.CallObj(DataStream, FontObjId); }