Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSDictionary.keySet()


        {
            COSDictionary shadingsDictionary = (COSDictionary)resources.getDictionaryObject( COSName.SHADING );
            if( shadingsDictionary != null )
            {
                shadings = new HashMap<String,PDShadingResources>();
                for( COSName name : shadingsDictionary.keySet() )
                {
                    COSDictionary dictionary = (COSDictionary)shadingsDictionary.getDictionaryObject( name );
                    shadings.put( name.getName(), PDShadingResources.create( dictionary ) );
                }
            }
View Full Code Here


            }
        }

        // the dictionaries preserve the order keys were added, as such we shall
        // add them in the proper order, not the reverse order
        Set<COSName> backwardsKeys = backwardsDictionary.keySet();
        for(int i = backwardsKeys.size()-1; i >=0; i--)
            dict.setItem((COSName)backwardsKeys.toArray()[i], backwardsDictionary.getItem((COSName)backwardsKeys.toArray()[i]));
       
        // consume the last two '<' chars
        readByteBackwards();
View Full Code Here

            ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
        }
        COSDictionary map = (COSDictionary)ap;
        Map<String, PDAppearanceStream> actuals = new HashMap<String, PDAppearanceStream>();
        Map retval = new COSDictionaryMap( actuals, map );
        for( COSName asName : map.keySet() )
        {
            COSStream as = (COSStream)map.getDictionaryObject( asName );
            actuals.put( asName.getName(), new PDAppearanceStream( as ) );
        }
        return retval;
View Full Code Here

                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
            }
            COSDictionary map = (COSDictionary)ap;
            Map<String, PDAppearanceStream> actuals = new HashMap<String, PDAppearanceStream>();
            retval = new COSDictionaryMap( actuals, map );
            for( COSName asName : map.keySet() )
            {
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }
View Full Code Here

            }
            COSDictionary map = (COSDictionary)ap;
            Map<String, PDAppearanceStream> actuals =
                new HashMap<String, PDAppearanceStream>();
            retval = new COSDictionaryMap( actuals, map );
            for( COSName asName : map.keySet() )
            {
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }
View Full Code Here

    COSBase aa = dictionary
    .getDictionaryObject(DICTIONARY_KEY_ADDITIONAL_ACTION);
    if (aa != null) {
      COSDictionary aaDict = COSUtils.getAsDictionary(aa, cDoc);
      if (aaDict != null) {
        for (Object key : aaDict.keySet()) {
          COSName name = (COSName) key;
          callCreateAction(aaDict.getItem(name), cDoc, result, name.getName(), alreadyCreated);
        }
      }
    }
View Full Code Here

      PDFontDescriptorDictionary pdFontDesc) {
    boolean fname = false, flags = false, itangle = false, cheight = false;
    boolean fbbox = false, asc = false, desc = false, stemv = false;

    COSDictionary fontDescDictionary = pdFontDesc.getCOSDictionary();
    for (Object key : fontDescDictionary.keySet()) {

      if (!(key instanceof COSName)) {
        this.fontContainer.addError(new ValidationResult.ValidationError(
            ValidationConstants.ERROR_SYNTAX_DICTIONARY_KEY_INVALID,
            "Invalid key in The font descriptor"));
View Full Code Here

    COSBase egsEntry = resources.getItem(COSName
        .getPDFName(TRANPARENCY_DICTIONARY_KEY_EXTGSTATE));
    COSDictionary extGStates = COSUtils.getAsDictionary(egsEntry, cDoc);

    if (extGStates != null) {
      for (Object object : extGStates.keySet()) {
        COSName key = (COSName) object;
        if (key.getName().matches(
            TRANPARENCY_DICTIONARY_KEY_EXTGSTATE_ENTRY_REGEX)) {
          COSBase gsBase = extGStates.getItem(key);
          COSDictionary gsDict = COSUtils.getAsDictionary(gsBase, cDoc);
View Full Code Here

    boolean res = true;
    if (resources != null) {
      COSDictionary shadings = (COSDictionary) resources.getCOSDictionary()
          .getDictionaryObject(PATTERN_KEY_SHADING);
      if (shadings != null) {
        for (Object key : shadings.keySet()) {
          COSDictionary aShading = (COSDictionary) shadings
              .getDictionaryObject((COSName) key);
          ShadingPattern sp = new ShadingPattern(handler, aShading);
          List<ValidationError> lErrors = sp.validate();
          if (lErrors != null && !lErrors.isEmpty()) {
View Full Code Here

    PDResources resources = page.getResources();
    COSDictionary shadings = (COSDictionary) resources.getCOSDictionary()
        .getDictionaryObject(PATTERN_KEY_SHADING);
    boolean res = true;
    if (shadings != null) {
      for (Object key : shadings.keySet()) {
        COSDictionary aShading = (COSDictionary) shadings
            .getDictionaryObject((COSName) key);
        ShadingPattern sp = new ShadingPattern(handler, aShading);
        List<ValidationError> lErrors = sp.validate();
        if (lErrors != null && !lErrors.isEmpty()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.