internal JavaScript( PdfDirectObject baseObject, PdfIndirectObject container, PdfString name ) : base(baseObject, container, name) { }
internal PdfIndirectObject ReadIndirectObject(IPdfStreamReader streamReader, IPdf pdf, int objectNumber, int generation) { //get the inner object. var innerObject = this.ReadObject(streamReader, pdf); var nextToken = streamReader.PeekNextToken(); //check to see if it's a stream if (nextToken == "stream") { innerObject = this.ReadStream(streamReader, pdf, innerObject as PdfDictionary); } //advance the stream, reading in the token. //this will should be the same as the peek above unless it was a stream, in which case it should be endobj nextToken = streamReader.ReadNextToken(); if (nextToken != "endobj") { throw new InvalidDataException("Unexpected token at end of indirect object"); } var result = new PdfIndirectObject(innerObject, objectNumber, generation); return(result); }
private static PdfFont smethod_0( PdfBody body, string pdfFontID, WW.Pdf.Font.Font font, ns0.Class30 cidFont) { PdfIndirectObject <PdfFontFile> pdfIndirectObject1 = new PdfIndirectObject <PdfFontFile>(new PdfFontFile(font.Descriptor.FontData)); Class40 class40 = PdfFontCreator.smethod_4(pdfFontID, (IFontMetric)cidFont); PdfIndirectObject <Class40> pdfIndirectObject2 = new PdfIndirectObject <Class40>(class40); class40.FontFile2 = pdfIndirectObject1; Class39 class39 = new Class39(cidFont.Registry, cidFont.Ordering, cidFont.Supplement); Class35 class35 = new Class35(PdfFontSubTypeEnum.CIDFontType2, font.FontName); class35.SystemInfo = class39; class35.Descriptor = pdfIndirectObject2; class35.DefaultWidth = cidFont.DefaultWidth; class35.Widths = cidFont.WArray; PdfCMap pdfCmap = new PdfCMap(); pdfCmap.AddFilter((IFilter) new FlateFilter()); pdfCmap.SystemInfo = class39; pdfCmap.AddBfRanges(cidFont.CMapEntries); PdfIndirectObject <PdfCMap> pdfIndirectObject3 = new PdfIndirectObject <PdfCMap>(pdfCmap); Class36 class36 = new Class36(pdfFontID, font.FontName); class36.Encoding = cidFont.Encoding; class36.Descendant = class35; class36.ToUnicode = pdfIndirectObject3; body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject2); body.IndirectObjects.Add((IPdfIndirectObject)class35); body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject3); body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject1); return((PdfFont)class36); }
/** * <summary>Wraps a destination base object into a destination object.</summary> * <param name="baseObject">Destination base object.</param> * <param name="container">Destination base object container.</param> * <param name="name">Destination name.</param> * <returns>Destination object associated to the base object.</returns> */ public static Destination Wrap( PdfDirectObject baseObject, PdfIndirectObject container, PdfString name ) { /* * NOTE: This is a factory method for any destination-derived object. */ if (baseObject == null) { return(null); } PdfArray dataObject = (PdfArray)File.Resolve(baseObject); PdfDirectObject pageObject = dataObject[0]; if (pageObject is PdfReference) { return(new LocalDestination(baseObject, container, name)); } else if (pageObject is PdfInteger) { return(new RemoteDestination(baseObject, container, name)); } else { throw new ArgumentException("'baseObject' parameter doesn't represent a valid destination object."); } }
internal string AddImage(PdfIndirectObject imageLink) { string result = "Im" + xObject.Count; xObject[result] = imageLink; return("/" + result); }
/** * <summary>Wraps a function base object into a function object.</summary> * <param name="baseObject">Function base object.</param> * <param name="container">Function base object container.</param> * <returns>Function object associated to the base object.</returns> */ public static Function Wrap( PdfDirectObject baseObject, PdfIndirectObject container ) { if (baseObject == null) { return(null); } PdfDataObject dataObject = files.File.Resolve(baseObject); PdfDictionary dictionary = GetDictionary(dataObject); int functionType = ((PdfInteger)dictionary[PdfName.FunctionType]).RawValue; switch (functionType) { case FunctionType0: return(new Type0Function(baseObject)); case FunctionType2: return(new Type2Function(baseObject, container)); case FunctionType3: return(new Type3Function(baseObject, container)); case FunctionType4: return(new Type4Function(baseObject)); default: throw new NotSupportedException("Function type " + functionType + " unknown."); } }
internal ResolvedObject( T dataObject, PdfIndirectObject container ) { this.DataObject = dataObject; this.Container = container; }
internal AnnotationActions( Annotation parent, PdfDirectObject baseObject, PdfIndirectObject container ) : base(baseObject, container) { this.parent = parent; }
internal Contents( PdfDirectObject baseObject, PdfIndirectObject container, IContentContext contentContext ) : base(baseObject, container) { this.contentContext = contentContext; Load(); }
/** * <summary>Wraps the specified base object into a property list object.</summary> * <param name="baseObject">Base object of a property list object.</param> * <param name="container">Indirect object possibly containing the property list base object.</param> * <returns>Property list object corresponding to the base object.</returns> */ public static PropertyList Wrap( PdfDirectObject baseObject, PdfIndirectObject container ) { return(baseObject == null ? null : new PropertyList(baseObject, container)); }