Examples of PdfDataObject


Examples of org.pdfclown.objects.PdfDataObject

  @Override
  public boolean isEmpty(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
      return false;
    else // Multiple actions.
      return ((PdfArray)baseDataObject).isEmpty();
  }
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  @Override
  public int size(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
      return 1;
    else // Multiple actions.
      return ((PdfArray)baseDataObject).size();
  }
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  @SuppressWarnings("unchecked")
  public <T> T[] toArray(
    T[] values
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
    {
      if(values.length == 0)
      {values = (T[])new Object[1];}
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  // <private>
  private PdfArray ensureArray(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single action.
    {
      PdfArray actionsArray = new PdfArray();
      actionsArray.add(getBaseObject());
      setBaseObject(actionsArray);
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

    {
      /*
        NOTE: In order to get the unicode mapping stream we have to get
        its corresponding font object, which is a dictionary.
      */
      PdfDataObject dataObject = indirectObject.getDataObject();
      if(!(dataObject instanceof PdfDictionary) // Data object is NOT a dictionary.
        || !PdfName.Font.equals(((PdfDictionary)dataObject).get(PdfName.Type))) // Dictionary is NOT a font object.
        continue;

      // Get the indirect reference to the ToUnicode stream associated to the font object!
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  @Override
  public Widget get(
    int index
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
    {
      if(index != 0)
        throw new IndexOutOfBoundsException("Index: " + index + ", Size: 1");
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

    )
  {
    if(!(value instanceof Widget))
      return -1;

    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
    {
      if(((Widget)value).getBaseObject().equals(getBaseObject()))
        return 0;
      else
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

    )
  {
    if(!(value instanceof Widget))
      return false;

    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return ((Widget)value).getBaseObject().equals(getBaseObject());

    return ((PdfArray)baseDataObject).contains(((Widget)value).getBaseObject());
  }
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  @Override
  public boolean isEmpty(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return false;
    else // Array.
      return ((PdfArray)baseDataObject).isEmpty();
  }
View Full Code Here

Examples of org.pdfclown.objects.PdfDataObject

  @Override
  public int size(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
      return 1;
    else // Array.
      return ((PdfArray)baseDataObject).size();
  }
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.