internal override Action Clone(IDocumentEssential owner) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Type", new PDFName("Action")); dict.AddItem("S", new PDFName("Sound")); IPDFObject sound = _dictionary["Sound"]; if (sound != null) { dict.AddItem("Sound", sound); } string[] keys = { "Volume", "Synchronous", "Repeat", "Mix" }; for (int i = 0; i < keys.Length; ++i) { IPDFObject obj = _dictionary[keys[i]]; if (obj != null) { dict.AddItem(keys[i], obj.Clone()); } } SoundAction action = new SoundAction(dict, owner); IPDFObject next = _dictionary["Next"]; if (next != null) { for (int i = 0; i < Next.Count; ++i) { action.Next.Add(Next[i]); } } return(action); }
internal override Action Clone(IDocumentEssential owner) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Type", new PDFName("Action")); dict.AddItem("S", new PDFName("GoToE")); PDFDictionary fs = _dictionary["F"] as PDFDictionary; if (fs != null) { dict.AddItem("F", fs); } string[] keys = { "D", "NewWindow", "T" }; for (int i = 0; i < keys.Length; ++i) { IPDFObject obj = _dictionary[keys[i]]; if (obj != null) { dict.AddItem(keys[i], obj.Clone()); } } GoToEmbeddedAction action = new GoToEmbeddedAction(dict, owner); IPDFObject next = _dictionary["Next"]; if (next != null) { for (int i = 0; i < Next.Count; ++i) { action.Next.Add(Next[i]); } } return(action); }
internal override Action Clone(IDocumentEssential owner) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Type", new PDFName("Action")); dict.AddItem("S", new PDFName("Movie")); PDFDictionary annot = _dictionary["Annotation"] as PDFDictionary; if (annot != null) { dict.AddItem("Annotation", annot); } string[] keys = { "Operation", "T" }; for (int i = 0; i < keys.Length; ++i) { IPDFObject obj = _dictionary[keys[i]]; if (obj != null) { dict.AddItem(keys[i], obj.Clone()); } } MovieAction action = new MovieAction(dict, owner); IPDFObject next = _dictionary["Next"]; if (next != null) { for (int i = 0; i < Next.Count; ++i) { action.Next.Add(Next[i]); } } return(action); }
internal override Action Clone(IDocumentEssential owner) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Type", new PDFName("Action")); dict.AddItem("S", new PDFName("GoTo")); GoToAction action = new GoToAction(dict, owner); action.Destination = Destination; IPDFObject next = _dictionary["Next"]; if (next != null) { for (int i = 0; i < Next.Count; ++i) { action.Next.Add(Next[i]); } } return(action); }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.Outline. /// </summary> /// <param name="title" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">The title of the outline.</param> /// <param name="action">The action to be performed when this item is activated.</param> public Outline(string title, Action action) { if (action == null) { throw new ArgumentNullException("action"); } if (title == null) { title = ""; } _dictionary = new PDFDictionary(); _dictionary.AddItem("Title", new PDFString(title)); Action = action; }
internal override void CreateApperance() { PDFDictionary ap = new PDFDictionary(); GraphicsTemplate n = new GraphicsTemplate(Width, Height, new float[] { 1, 0, 0, 1, 0, 0 }); if (_visible) { drawBackground(n); drawBorder(n); drawText(n); } ap.AddItem("N", n.GetDictionaryStream()); Dictionary.AddItem("AP", ap); }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.Outline. /// </summary> /// <param name="title" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">The title of the outline.</param> /// <param name="dest">The destination to be displayed when this item is activated.</param> public Outline(string title, Destination dest) { if (dest == null) { throw new ArgumentNullException("dest"); } if (title == null) { title = ""; } _dictionary = new PDFDictionary(); _dictionary.AddItem("Title", new PDFString(title)); Destination = dest; }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.PageLabel. /// </summary> /// <param name="firstPageIndex" href="http://msdn.microsoft.com/en-us/library/system.int32.aspx"> The page index of the first page in a labeling range.</param> /// <param name="prefix" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">The prefix of the page label.</param> public PageLabel(int firstPageIndex, string prefix) { if (firstPageIndex < 0) { throw new IndexOutOfRangeException(); } if (prefix == null) { prefix = string.Empty; } _firstPageIndex = firstPageIndex; _dictionary = new PDFDictionary(); _dictionary.AddItem("P", new PDFString(prefix)); }
public FullFileSpecification(string filename) { FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read); FileName = UF = System.IO.Path.GetFileName(filename); PDFDictionary embeddedFS = new PDFDictionary(); PDFDictionaryStream dictF = new PDFDictionaryStream(); byte[] data = new byte[fs.Length]; fs.Read(data, 0, data.Length); dictF.GetStream().Write(data, 0, data.Length); embeddedFS.AddItem("F", dictF); EF = embeddedFS; fs.Close(); }
internal override void CreateApperance() { PDFDictionary ap = new PDFDictionary(); PDFDictionary n = new PDFDictionary(); GraphicsTemplate off = new GraphicsTemplate(Width, Height, new float[] { 1, 0, 0, 1, 0, 0 }); GraphicsTemplate yes = new GraphicsTemplate(Width, Height, new float[] { 1, 0, 0, 1, 0, 0 }); drawContents(off); drawContents(yes); drawTick(yes); n.AddItem("Off", off.GetDictionaryStream()); n.AddItem(_exportValue, yes.GetDictionaryStream()); ap.AddItem("N", n); Dictionary.AddItem("AP", ap); }
internal override void CreateFontDictionary() { PDFDictionary dict = GetDictionary(); dict.AddItem("BaseFont", new PDFName(_trueTypeData.FontName)); dict.AddItem("Encoding", new PDFName("Identity-H")); dict.AddItem("Type", new PDFName("Font")); dict.AddItem("Subtype", new PDFName("Type0")); dict.AddItem("DescendantFonts", createDescendantFonts()); dict.AddItem("ToUnicode", createToUnicode()); }
internal Annotation(float left, float top, float width, float height, IDocumentEssential owner) { if (width < 0) { throw new ArgumentOutOfRangeException("width"); } if (height < 0) { throw new ArgumentOutOfRangeException("height"); } _dictionary = new PDFDictionary(); _dictionary.AddItem("Type", new PDFName("Annot")); setRect(left, top, left + width, top + height); Print = true; Owner = owner; }
internal override void WriteParameters(MemoryStream stream, Resources resources) { if (_color is ColorICC) { _color.Colorspace.WriteColorSpaceForNotStroking(stream, resources); } IPDFPageOperation operation = new DefaultColorSpaceForNotStroking(_color); operation.WriteBytes(stream); PDFDictionary dict = new PDFDictionary(); dict.AddItem("ca", new PDFNumber(_opacity / 100)); string name = resources.AddResources(ResourceType.ExtGState, dict); operation = new GraphicsState(name); operation.WriteBytes(stream); }
internal override void CreateApperance() { PDFDictionary ap = new PDFDictionary(); PDFDictionary n = new PDFDictionary(); GraphicsTemplate off = new GraphicsTemplate(Width, Height, new float[] { 1, 0, 0, 1, 0, 0 }); GraphicsTemplate yes = new GraphicsTemplate(Width, Height, new float[] { 1, 0, 0, 1, 0, 0 }); DrawBackground(off); DrawBorder(off); DrawBackground(yes); DrawBorder(yes); drawTick(yes); n.AddItem("Off", off.GetDictionaryStream()); n.AddItem("Yes", yes.GetDictionaryStream()); ap.AddItem("N", n); Dictionary.AddItem("AP", ap); }
internal override void WriteChanges(Pen newPen, MemoryStream stream, Resources resources) { if (!_dashPattern.Equals(newPen.DashPattern)) { IPDFPageOperation operation = new LineDash(newPen.DashPattern); operation.WriteBytes(stream); } if (!_lineCap.Equals(newPen.LineCap)) { IPDFPageOperation operation = new LineCap(newPen.LineCap); operation.WriteBytes(stream); } if (!_lineJoin.Equals(newPen.LineJoin)) { IPDFPageOperation operation = new LineJoin(newPen.LineJoin); operation.WriteBytes(stream); } if (!_miterLimit.Equals(newPen.MiterLimit)) { IPDFPageOperation operation = new MiterLimit(newPen.MiterLimit); operation.WriteBytes(stream); } if (!_opacity.Equals(newPen.Opacity / 100)) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("CA", new PDFNumber(newPen.Opacity / 100)); string name = resources.AddResources(ResourceType.ExtGState, dict); IPDFPageOperation operation = new GraphicsState(name); operation.WriteBytes(stream); } if (!_width.Equals(newPen.Width)) { IPDFPageOperation operation = new Linewidth(newPen.Width); operation.WriteBytes(stream); } if (newPen is ColoredTilingPen) { _pattern.WriteChangesForStroking((newPen as ColoredTilingPen)._pattern, stream, resources); } else { newPen.WriteParameters(stream, resources); } }
private void addFontDescriptor(Type1Parser parser) { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Ascent", new PDFNumber(parser.FontBBox.Height)); dict.AddItem("Descent", new PDFNumber(parser.FontBBox.Y)); dict.AddItem("CapHeight", new PDFNumber(0)); dict.AddItem("Flags", new PDFNumber(32)); dict.AddItem("FontName", new PDFName(parser.FontName)); dict.AddItem("ItalicAngle", new PDFNumber(parser.ItalicAngle)); dict.AddItem("StemV", new PDFNumber(0)); dict.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); System.Drawing.Rectangle rect = parser.FontBBox; bbox.AddItem(new PDFNumber(rect.X)); bbox.AddItem(new PDFNumber(rect.Y)); bbox.AddItem(new PDFNumber(rect.Width)); bbox.AddItem(new PDFNumber(rect.Height)); dict.AddItem("FontBBox", bbox); GetDictionary().AddItem("FontDescriptor", dict); }
private void parseKids(PDFDictionary dict) { IPDFObject resources = dict["Resources"]; IPDFObject mediaBox = dict["MediaBox"]; IPDFObject cropBox = dict["CropBox"]; IPDFObject rotate = dict["Rotate"]; PDFArray kids = _dictionary["Kids"] as PDFArray; PDFArray newKids = new PDFArray(); readPages(kids, newKids, resources, mediaBox, cropBox, rotate); dict.RemoveItem("Resources"); dict.RemoveItem("MediaBox"); dict.RemoveItem("CropBox"); dict.RemoveItem("Rotate"); dict.AddItem("Kids", newKids); }
internal static void CopyTo(PDFDictionary sourceDict, PDFDictionary destinationDict, Page oldPage, Page newPage) { PDFArray quadPoints = sourceDict["QuadPoints"] as PDFArray; if (quadPoints != null) { RectangleF oldRect; if (oldPage == null) { oldRect = new RectangleF(); } else { oldRect = oldPage.PageRect; } destinationDict.AddItem("QuadPoints", CloneUtility.CopyArrayCoordinates(quadPoints, oldRect, newPage.PageRect, oldPage == null)); } }
private PDFDictionary parseDictionary(int objNo, int genNo) { PDFDictionary dict = new PDFDictionary(); int b = _stream.ReadByte(); for (; ;) { if (IsEOL(b)) { SkipEOL(); b = _lastParsedByte; } if (b == '%') { ReadComment(); b = _lastParsedByte; continue; } if (b == '>') { break; } if (b != '/') { return(null); } string key = readNameBytes(); IPDFObject obj = readObject(_lastParsedByte, objNo, genNo); b = _lastParsedByte; if (obj == null) { return(null); } dict.AddItem(key, obj); } _stream.ReadByte(); _lastParsedByte = _stream.ReadByte(); return(dict); }
private void initializeDictionary() { PDFArray array = new PDFArray(); PDFDictionary dict = _stream.Dictionary; dict.AddItem("FunctionType", new PDFNumber((float)PDFFunctionType.Sampled)); for (int i = 0; i < _domain.Length; ++i) { array.AddItem(new PDFNumber(_domain[i])); } dict.AddItem("Domain", array); array = new PDFArray(); for (int i = 0; i < _range.Length; ++i) { array.AddItem(new PDFNumber(_range[i])); } dict.AddItem("Range", array); array = new PDFArray(); for (int i = 0; i < _size.Length; ++i) { array.AddItem(new PDFNumber(_size[i])); } dict.AddItem("Size", array); dict.AddItem("BitsPerSample", new PDFNumber(_bitsPerSample)); dict.AddItem("Order", new PDFNumber(_order)); array = new PDFArray(); for (int i = 0; i < _encode.Length; ++i) { array.AddItem(new PDFNumber(_encode[i])); } dict.AddItem("Encode", array); array = new PDFArray(); for (int i = 0; i < _decode.Length; ++i) { array.AddItem(new PDFNumber(_decode[i])); } dict.AddItem("Decode", array); }
internal override Annotation Clone(IDocumentEssential owner, Page page) { if (Page == null) { SetPage(page, true); ApplyOwner(owner); return(this); } PDFDictionary res = AnnotationBase.Copy(Dictionary); Field.CopyTo(Dictionary, res); string[] keys = { "MaxLen", "Q", "RV" }; for (int i = 0; i < keys.Length; ++i) { IPDFObject obj = Dictionary[keys[i]]; if (obj != null) { res.AddItem(keys[i], obj.Clone()); } } EditBox annot = new EditBox(res, owner, false); annot.SetPage(Page, false); annot.SetPage(page, true); annot._font = _font; annot._font.ChangedFontSize += annot.changedFontSize; annot._fontColor = _fontColor; annot.setTextAttributes(); Field.SetActions(this, annot); return(annot); }
//private Certificate _certificate; internal Sig(Certificate certificate) { _dictionary = new PDFDictionary(); _dictionary.AddItem("Type", new PDFName("Sig")); _dictionary.AddItem("Filter", new PDFName("Adobe.PPKMS")); _dictionary.AddItem("SubFilter", new PDFName("adbe.pkcs7.sha1")); //_dictionary.AddItem("Filter", new PDFName("Adobe.PPKLite")); //_dictionary.AddItem("SubFilter", new PDFName("adbe.pkcs7.detached")); _dictionary.AddItem("ByteRange", new PDFArray()); //_certificate = certificate; PKCS7 pkcs = new PKCS7(certificate.Akp, certificate.Chain, null, "SHA1", true); string name = PKCS7.GetSubjectFields(pkcs.SigningCertificate).GetField("CN"); _dictionary.AddItem("Name", new PDFString(System.Text.Encoding.Default.GetBytes(name), false)); byte[] buf = pkcs.GetEncodedPKCS7(null, DateTime.Now, /*null,*/ null); byte[] digest = new byte[buf.Length /* + 64*/]; _dictionary.AddItem("Contents", new PDFString(digest, true)); }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.Page class. /// </summary> /// <param name="width">The page width in specified units.</param> /// <param name="height">The page height in specified units.</param> /// <param name="units">Units of measure.</param> public Page(float width, float height, UnitOfMeasure units) { if (width <= 0) { throw new ArgumentOutOfRangeException("width"); } if (height <= 0) { throw new ArgumentOutOfRangeException("height"); } float newWidth, newHeight; switch (units) { case UnitOfMeasure.Inch: newWidth = width * 72; newHeight = height * 72; break; case UnitOfMeasure.Millimeter: newWidth = width / 25.4f * 72; newHeight = height / 25.4f * 72; break; case UnitOfMeasure.Centimeter: newWidth = width / 2.54f * 72; newHeight = height / 2.54f * 72; break; case UnitOfMeasure.Pixel96DPI: newWidth = width / 96 * 72; newHeight = height / 96 * 72; break; case UnitOfMeasure.Pixel120DPI: newWidth = width / 120 * 72; newHeight = height / 120 * 72; break; case UnitOfMeasure.Twip: newWidth = width / 20 * 72; newHeight = height / 20 * 72; break; case UnitOfMeasure.Document: newWidth = width / 300 * 72; newHeight = height / 300 * 72; break; default: newWidth = width; newHeight = height; break; } _dictionary = new PDFDictionary(); _dictionary.AddItem("Type", new PDFName("Page")); _dictionary.AddItem("MediaBox", createBox(0, 0, newWidth, newHeight)); Watermarks = new WatermarkCollection(); }
private IPDFObject createEncrypt() { PDFDictionary dict = new PDFDictionary(); dict.AddItem("Filter", new PDFName("Standard")); dict.AddItem("P", new PDFNumber(_encryptor.Permissions)); dict.AddItem("R", new PDFNumber(_encryptor.Revision)); dict.AddItem("V", new PDFNumber(_encryptor.Version)); dict.AddItem("Length", new PDFNumber(_encryptor.KeyLength)); dict.AddItem("U", new PDFString(_encryptor.GetUserHash(), true)); dict.AddItem("O", new PDFString(_encryptor.GetOwnerHash(), true)); if (_encryptor.Revision >= 4) { dict.AddItem("EncryptMetadata", new PDFBoolean(_encryptor.EncryptMetadata)); dict.AddItem("StmF", new PDFName("StdCF")); dict.AddItem("StrF", new PDFName("StdCF")); PDFDictionary stdCf = new PDFDictionary(); stdCf.AddItem("AuthEvent", new PDFName("DocOpen")); if (_encryptor.Revision == 4) { stdCf.AddItem("CFM", new PDFName("AESV2")); stdCf.AddItem("Length", new PDFNumber(16)); } else { stdCf.AddItem("CFM", new PDFName("AESV3")); stdCf.AddItem("Length", new PDFNumber(32)); } PDFDictionary cf = new PDFDictionary(); cf.AddItem("StdCF", stdCf); dict.AddItem("CF", cf); } if (_encryptor.Revision == 5) { dict.AddItem("OE", new PDFString(_encryptor.GetOE(), true)); dict.AddItem("UE", new PDFString(_encryptor.GetUE(), true)); dict.AddItem("Perms", new PDFString(_encryptor.GetPerms(), true)); } Entry entry = new Entry(0, 0); dict.ObjNo = _entries.Count; entry.Object = dict; _entries.Add(entry); return(dict); }
internal void SetCreatorAndProducer(string val) { _dictionary.AddItem("Producer", new PDFString(val)); _dictionary.AddItem("Creator", new PDFString(val)); }
private void addZapfDingbatsDescriptor() { PDFDictionary descriptor = new PDFDictionary(); descriptor.AddItem("Ascent", new PDFNumber(692)); descriptor.AddItem("CapHeight", new PDFNumber(0)); descriptor.AddItem("Descent", new PDFNumber(-140)); descriptor.AddItem("Flags", new PDFNumber(4)); descriptor.AddItem("FontName", new PDFName("ZapfDingbats")); descriptor.AddItem("FontWeight", new PDFNumber(500)); descriptor.AddItem("ItalicAngle", new PDFNumber(0)); descriptor.AddItem("MissingWidth", new PDFNumber(278)); descriptor.AddItem("StemV", new PDFNumber(0)); descriptor.AddItem("XHeight", new PDFNumber(0)); descriptor.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); bbox.AddItem(new PDFNumber(-1)); bbox.AddItem(new PDFNumber(-143)); bbox.AddItem(new PDFNumber(981)); bbox.AddItem(new PDFNumber(820)); descriptor.AddItem("FontBBox", bbox); byte[] data = System.Text.Encoding.ASCII.GetBytes("/space/a1/a2/a202/a3/a4/a5/a119/a118/a117/a11/a12/a13/a14/a15/a16/a105/a17/a18/a19/a20/a21/a22/a23/a24/a25/a26/a27/a28/a6/a7/a8/a9/a10/a29/a30/a31/a32/a33/a34/a35/a36/a37/a38/a39/a40/a41/a42/a43/a44/a45/a46/a47/a48/a49/a50/a51/a52/a53/a54/a55/a56/a57/a58/a59/a60/a61/a62/a63/a64/a65/a66/a67/a68/a69/a70/a71/a72/a73/a74/a203/a75/a204/a76/a77/a78/a79/a81/a82/a83/a84/a97/a98/a99/a100/a89/a90/a93/a94/a91/a92/a205/a85/a206/a86/a87/a88/a95/a96/a101/a102/a103/a104/a106/a107/a108/a112/a111/a110/a109/a120/a121/a122/a123/a124/a125/a126/a127/a128/a129/a130/a131/a132/a133/a134/a135/a136/a137/a138/a139/a140/a141/a142/a143/a144/a145/a146/a147/a148/a149/a150/a151/a152/a153/a154/a155/a156/a157/a158/a159/a160/a161/a163/a164/a196/a165/a192/a166/a167/a168/a169/a170/a171/a172/a173/a162/a174/a175/a176/a177/a178/a179/a193/a180/a199/a181/a200/a182/a201/a183/a184/a197/a185/a194/a198/a186/a195/a187/a188/a189/a190/a191"); descriptor.AddItem("CharSet", new PDFString(data, false)); GetDictionary().AddItem("FontDescriptor", descriptor); addZapfDingbatsEncodingDictionary(); }
private void addTimesItalicDescriptor() { PDFDictionary descriptor = new PDFDictionary(); descriptor.AddItem("Ascent", new PDFNumber(683)); descriptor.AddItem("CapHeight", new PDFNumber(653)); descriptor.AddItem("Descent", new PDFNumber(-217)); descriptor.AddItem("Flags", new PDFNumber(32)); descriptor.AddItem("FontName", new PDFName("Times-Italic")); descriptor.AddItem("FontWeight", new PDFNumber(500)); descriptor.AddItem("ItalicAngle", new PDFNumber(-15)); descriptor.AddItem("MissingWidth", new PDFNumber(250)); descriptor.AddItem("StemV", new PDFNumber(0)); descriptor.AddItem("XHeight", new PDFNumber(441)); descriptor.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); bbox.AddItem(new PDFNumber(-169)); bbox.AddItem(new PDFNumber(-217)); bbox.AddItem(new PDFNumber(1010)); bbox.AddItem(new PDFNumber(883)); descriptor.AddItem("FontBBox", bbox); GetDictionary().AddItem("FontDescriptor", descriptor); addEncoding(); }
private void addSymbolDescriptor() { PDFDictionary descriptor = new PDFDictionary(); descriptor.AddItem("Ascent", new PDFNumber(692)); descriptor.AddItem("CapHeight", new PDFNumber(0)); descriptor.AddItem("Descent", new PDFNumber(-14)); descriptor.AddItem("Flags", new PDFNumber(4)); descriptor.AddItem("FontName", new PDFName("Symbol")); descriptor.AddItem("FontWeight", new PDFNumber(500)); descriptor.AddItem("ItalicAngle", new PDFNumber(0)); descriptor.AddItem("MissingWidth", new PDFNumber(250)); descriptor.AddItem("StemV", new PDFNumber(0)); descriptor.AddItem("XHeight", new PDFNumber(0)); descriptor.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); bbox.AddItem(new PDFNumber(-180)); bbox.AddItem(new PDFNumber(-293)); bbox.AddItem(new PDFNumber(1090)); bbox.AddItem(new PDFNumber(1010)); descriptor.AddItem("FontBBox", bbox); byte[] data = System.Text.Encoding.ASCII.GetBytes("/space/exclam/universal/numbersign/existential/percent/ampersand/suchthat/parenleft/parenright/asteriskmath/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/congruent/Alpha/Beta/Chi/Delta/Epsilon/Phi/Gamma/Eta/Iota/theta1/Kappa/Lambda/Mu/Nu/Omicron/Pi/Theta/Rho/Sigma/Tau/Upsilon/sigma1/Omega/Xi/Psi/Zeta/bracketleft/therefore/bracketright/perpendicular/underscore/radicalex/alpha/beta/chi/delta/epsilon/phi/gamma/eta/iota/phi1/kappa/lambda/mu/nu/omicron/pi/theta/rho/sigma/tau/upsilon/omega1/omega/xi/psi/zeta/braceleft/bar/braceright/similar/Euro/Upsilon1/minute/lessequal/fraction/infinity/florin/club/diamond/heart/spade/arrowboth/arrowleft/arrowup/arrowright/arrowdown/degree/plusminus/second/greaterequal/multiply/proportional/partialdiff/bullet/divide/notequal/equivalence/approxequal/ellipsis/arrowvertex/arrowhorizex/carriagereturn/aleph/Ifraktur/Rfraktur/weierstrass/circlemultiply/circleplus/emptyset/intersection/union/propersuperset/reflexsuperset/notsubset/propersubset/reflexsubset/element/notelement/angle/gradient/registerserif/copyrightserif/trademarkserif/product/radical/dotmath/logicalnot/logicaland/logicalor/arrowdblboth/arrowdblleft/arrowdblup/arrowdblright/arrowdbldown/lozenge/angleleft/registersans/copyrightsans/trademarksans/summation/parenlefttp/parenleftex/parenleftbt/bracketlefttp/bracketleftex/bracketleftbt/bracelefttp/braceleftmid/braceleftbt/braceex/angleright/integral/integraltp/integralex/integralbt/parenrighttp/parenrightex/parenrightbt/bracketrighttp/bracketrightex/bracketrightbt/bracerighttp/bracerightmid/bracerightbt"); descriptor.AddItem("CharSet", new PDFString(data, false)); GetDictionary().AddItem("FontDescriptor", descriptor); addSymbolEncodingDictionary(); }
private void addHelveticaObliqueDescriptor() { PDFDictionary descriptor = new PDFDictionary(); descriptor.AddItem("Ascent", new PDFNumber(718)); descriptor.AddItem("CapHeight", new PDFNumber(718)); descriptor.AddItem("Descent", new PDFNumber(-207)); descriptor.AddItem("Flags", new PDFNumber(32)); descriptor.AddItem("FontName", new PDFName("Helvetica-Oblique")); descriptor.AddItem("FontWeight", new PDFNumber(500)); descriptor.AddItem("ItalicAngle", new PDFNumber(-12)); descriptor.AddItem("MissingWidth", new PDFNumber(278)); descriptor.AddItem("StemV", new PDFNumber(0)); descriptor.AddItem("XHeight", new PDFNumber(532)); descriptor.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); bbox.AddItem(new PDFNumber(-166)); bbox.AddItem(new PDFNumber(-225)); bbox.AddItem(new PDFNumber(1000)); bbox.AddItem(new PDFNumber(931)); descriptor.AddItem("FontBBox", bbox); GetDictionary().AddItem("FontDescriptor", descriptor); addEncoding(); }
private void addCourierObliqueDescriptor() { PDFDictionary descriptor = new PDFDictionary(); descriptor.AddItem("Ascent", new PDFNumber(629)); descriptor.AddItem("CapHeight", new PDFNumber(562)); descriptor.AddItem("Descent", new PDFNumber(-157)); descriptor.AddItem("Flags", new PDFNumber(32)); descriptor.AddItem("FontName", new PDFName("Courier-Oblique")); descriptor.AddItem("FontWeight", new PDFNumber(500)); descriptor.AddItem("ItalicAngle", new PDFNumber(-11)); descriptor.AddItem("MissingWidth", new PDFNumber(600)); descriptor.AddItem("StemV", new PDFNumber(0)); descriptor.AddItem("XHeight", new PDFNumber(426)); descriptor.AddItem("Type", new PDFName("FontDescriptor")); PDFArray bbox = new PDFArray(); bbox.AddItem(new PDFNumber(-6)); bbox.AddItem(new PDFNumber(-249)); bbox.AddItem(new PDFNumber(639)); bbox.AddItem(new PDFNumber(803)); descriptor.AddItem("FontBBox", bbox); GetDictionary().AddItem("FontDescriptor", descriptor); addEncoding(); }