Exemple #1
0
        internal override void SaveToStream(TPdfStream DataStream, TXRefSection XRef)
        {
            BeginSaveToStream(DataStream, XRef);
            SaveKey(DataStream, TPdfToken.SubtypeName, "/" + FCommentProperties.CommentType.ToString());
            SaveUnicodeKey(DataStream, TPdfToken.ContentsName, FComment);
            SaveKey(DataStream, TPdfToken.NameName, "/" + FCommentProperties.Icon.ToString());
            SaveKey(DataStream, TPdfToken.CAName, PdfConv.DoubleToString(FCommentProperties.Opacity));
            if (FCommentProperties.CommentType != TPdfCommentType.Text)
            {
                Color  aColor  = FCommentProperties.BackgroundColor;
                string BgColor = TPdfTokens.GetString(TPdfToken.OpenArray) +
                                 PdfConv.CoordsToString(aColor.R / 255.0) + " " +
                                 PdfConv.CoordsToString(aColor.G / 255.0) + " " +
                                 PdfConv.CoordsToString(aColor.B / 255.0) +
                                 TPdfTokens.GetString(TPdfToken.CloseArray);

                SaveKey(DataStream, TPdfToken.ICName, BgColor);
            }
            EndSaveToStream(DataStream, XRef);
        }
Exemple #2
0
 protected override void SaveExtraKeys(TPdfStream DataStream, TXRefSection XRef, bool Compress)
 {
     TDictionaryRecord.SaveKey(DataStream, TPdfToken.C0Name, PdfConv.ToString(C0, true));
     TDictionaryRecord.SaveKey(DataStream, TPdfToken.C1Name, PdfConv.ToString(C1, true));
     TDictionaryRecord.SaveKey(DataStream, TPdfToken.NName, PdfConv.DoubleToString(N));
 }