Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfDictionary


    Page page
    )
  {
    super(
      context.getFile(),
      new PdfDictionary(
        new PdfName[]
        {
          PdfName.Type,
          PdfName.Subtype,
          PdfName.P,
View Full Code Here


    Document context
    )
  {
    super(
      context.getFile(),
      new PdfDictionary(
        new PdfName[]
        {
          PdfName.Type,
          PdfName.Count
        },
View Full Code Here

            Encoding.encode((String)token),
            PdfString.SerializationModeEnum.Literal
            );
        case DictionaryBegin:
          {
            PdfDictionary dictionary = new PdfDictionary();
            // Populate the dictionary.
            while(true)
            {
              // Key.
              moveNext();
              if(tokenType == TokenTypeEnum.DictionaryEnd)
                break;
              PdfName key = (PdfName)parsePdfObject();

              // Value.
              moveNext();
              PdfDirectObject value = parsePdfObject();

              // Add the current entry to the dictionary!
              dictionary.put(key,value);
            }
            return dictionary;
          }
        case ArrayBegin:
          {
View Full Code Here

    Document context
    )
  {
    super(
      context.getFile(),
      new PdfDictionary(
        new PdfName[]
        {PdfName.Fields},
        new PdfDirectObject[]
        {new PdfArray()}
        )
View Full Code Here

    String title
    )
  {
    super(
      context.getFile(),
      new PdfDictionary()
      );
    setTitle(title);
  }
View Full Code Here

    Document context
    )
  {
    super(
      context.getFile(),
      new PdfDictionary()
      );
  }
View Full Code Here

  // <protected>
  protected Map<ByteArray,Integer> getNativeEncoding(
    )
  {
    PdfDictionary descriptor = getDescriptor();
    if(descriptor.containsKey(PdfName.FontFile)) // Embedded noncompact Type 1 font.
    {
      PdfStream fontFileStream = (PdfStream)descriptor.resolve(PdfName.FontFile);
      PfbParser parser = new PfbParser(fontFileStream.getBody());
      return parser.parse();
    }
    else if(descriptor.containsKey(PdfName.FontFile3)) // Embedded compact Type 1 font.
    {
      PdfStream fontFileStream = (PdfStream)descriptor.resolve(PdfName.FontFile3);
      PdfName fontFileSubtype = (PdfName)fontFileStream.getHeader().get(PdfName.Subtype);
      if(fontFileSubtype.equals(PdfName.Type1C)) // CFF.
      {throw new NotImplementedException("Embedded CFF font file.");}
      else if(fontFileSubtype.equals(PdfName.OpenType)) // OpenFont/CFF.
      {throw new NotImplementedException("Embedded OpenFont/CFF font file.");}
View Full Code Here

      {codes = getNativeEncoding();}
      else if(encodingObject instanceof PdfName) // Predefined encoding.
      {codes = Encoding.get((PdfName)encodingObject).getCodes();}
      else // Custom encoding.
      {
        PdfDictionary encodingDictionary = (PdfDictionary)encodingObject;

        // 1. Base encoding.
        PdfName baseEncodingName = (PdfName)encodingDictionary.get(PdfName.BaseEncoding);
        if(baseEncodingName == null) // Native base encoding.
        {codes = getNativeEncoding();}
        else // Predefined base encoding.
        {codes = Encoding.get(baseEncodingName).getCodes();}
View Full Code Here

    {
      /*
        NOTE: Single states are erased as they have no valid key
        to be consistently integrated within the dictionary.
      */
      setBaseObject((PdfDirectObject)(baseDataObject = new PdfDictionary()));
      appearance.getBaseDataObject().put(statesKey,(PdfDictionary)baseDataObject);
    }
    return (PdfDictionary)baseDataObject;
  }
View Full Code Here

    Document context
    )
  {
    super(
      context.getFile(),
      new PdfDictionary(
        new PdfName[]{PdfName.Type},
        new PdfDirectObject[]{PdfName.Trans}
        )
      );
  }
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfDictionary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.