Package org.pdfclown.documents.contents.xObjects

Examples of org.pdfclown.documents.contents.xObjects.FormXObject


    document.setPageSize(PageFormat.getSize());

    // 2. Content creation.
    Date creationDate = new Date();
    // 2.1. Template.
    FormXObject template = buildTemplate(
      document,
      creationDate
      );
    // 2.2. Welcome page.
    buildWelcomePage(
View Full Code Here


    Document document,
    Date creationDate
    )
  {
    // Create a template (form)!
    FormXObject template = new FormXObject(document);

    // Size.
    template.setSize(document.getPageSize());
    Dimension2D templateSize = template.getSize();

    // Get form content stream!
    PrimitiveComposer composer = new PrimitiveComposer(template);

    // Showing the header image inside the common content stream...
View Full Code Here

      else if(baseDataObject instanceof PdfStream) // Single state.
      {
        entrySet.add(
          new Entry(
            null,
            new FormXObject(getBaseObject())
            )
          );
      }
      else // Multiple state.
      {
        for(Map.Entry<PdfName,PdfDirectObject> entry : ((PdfDictionary)baseDataObject).entrySet())
        {
          entrySet.add(
            new Entry(
              entry.getKey(),
              new FormXObject(entry.getValue())
              )
            );
        }
      }
    }
View Full Code Here

    if(baseDataObject == null) // No state.
      return null;
    else if(key == null)
    {
      if(baseDataObject instanceof PdfStream) // Single state.
        return new FormXObject(getBaseObject());
      else // Multiple state, but invalid key.
        return null;
    }
    else // Multiple state.
      return new FormXObject(((PdfDictionary)baseDataObject).get(key));
  }
View Full Code Here

    }
    else // Multiple state.
    {previousValue = ensureDictionary().put(key,value.getBaseObject());}

    if(File.resolve(previousValue) instanceof PdfStream)
      return new FormXObject(previousValue);
    else
      return null;
  }
View Full Code Here

      }
      else // Multiple state.
      {previousValue = ((PdfDictionary)baseDataObject).remove(key);}

      if(File.resolve(previousValue) instanceof PdfStream)
        return new FormXObject(previousValue);
      else
        return null;
    }
  }
View Full Code Here

      NOTE: This is necessary to keep the reference to the on-state name.
    */
    Appearance appearance = new Appearance(page.getDocument());
    setAppearance(appearance);
    AppearanceStates normalAppearance = appearance.getNormal();
    normalAppearance.put(new PdfName(widgetName),new FormXObject(page.getDocument()));
  }
View Full Code Here

    Document context
    )
  {
    File contextFile = context.getFile();

    FormXObject form = new FormXObject(context);
    PdfStream formStream = form.getBaseDataObject();

    // Header.
    {
      PdfDictionary formHeader = formStream.getHeader();
      // Bounding box.
View Full Code Here

    */
    PdfReference alternateIconObject = (PdfReference)getBaseDataObject().get(PdfName.IX);
    if(alternateIconObject == null)
      return null;

    return new FormXObject(alternateIconObject);
  }
View Full Code Here

    */
    PdfReference normalIconObject = (PdfReference)getBaseDataObject().get(PdfName.I);
    if(normalIconObject == null)
      return null;

    return new FormXObject(normalIconObject);
  }
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.contents.xObjects.FormXObject

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.