Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfString


      )
    {
      /*
        NOTE: 'N' entry may be undefined.
      */
      PdfString fileNameObject = (PdfString)getBaseDataObject().get(PdfName.N);
      if(fileNameObject == null)
        return null;

      return (String)fileNameObject.getValue();
    }
View Full Code Here


      {
        PdfDirectObject pageRefObject;
        if(value instanceof Integer)
        {pageRefObject = new PdfInteger((Integer)value);}
        else if(value instanceof String)
        {pageRefObject = new PdfString((String)value);}
        else
          throw new IllegalArgumentException("Wrong argument type: it MUST be either a page number Integer or a named destination String.");

        getBaseDataObject().put(PdfName.P, pageRefObject);
      }
View Full Code Here

      )
    {
      if(value == null)
      {getBaseDataObject().remove(PdfName.N);}
      else
      {getBaseDataObject().put(PdfName.N, new PdfString(value));}
    }
View Full Code Here

    @see #getURI()
  */
  public void setURI(
    URI value
    )
  {getBaseDataObject().put(PdfName.URI,new PdfString(value.toString()));}
View Full Code Here

        System.out.println("Named destinations found (" + namedDestinations.getContainer().getReference() + ")");

        // Parsing the named destinations...
        for(Map.Entry<PdfString,Destination> namedDestination : namedDestinations.entrySet())
        {
          PdfString key = namedDestination.getKey();
          Destination value = namedDestination.getValue();

          System.out.println("Destination '" + key.getValue() + "' (" + value.getContainer().getReference() + ")");

          System.out.print("    Target Page: number = ");
          Object pageRef = value.getPageRef();
          if(pageRef instanceof Integer) // NOTE: numeric page refs are typical of remote destinations.
          {System.out.println(((Integer)pageRef) + 1);}
View Full Code Here

      )
    {
      /*
        NOTE: 'D' entry may be undefined.
      */
      PdfString defaultDirectoryObject = (PdfString)getBaseDataObject().get(PdfName.D);
      if(defaultDirectoryObject == null)
        return null;

      return (String)defaultDirectoryObject.getValue();
    }
View Full Code Here

      )
    {
      /*
        NOTE: 'O' entry may be undefined.
      */
      PdfString operationObject = (PdfString)getBaseDataObject().get(PdfName.O);
      if(operationObject == null)
        return OperationEnum.Open;

      return OperationEnum.get(operationObject);
    }
View Full Code Here

      )
    {
      /*
        NOTE: 'P' entry may be undefined.
      */
      PdfString parameterStringObject = (PdfString)getBaseDataObject().get(PdfName.P);
      if(parameterStringObject == null)
        return null;

      return (String)parameterStringObject.getValue();
    }
View Full Code Here

      @see #getDefaultDirectory()
    */
    public void setDefaultDirectory(
      String value
      )
    {getBaseDataObject().put(PdfName.D, new PdfString(value));}
View Full Code Here

      @see #getFileName()
    */
    public void setFileName(
      String value
      )
    {getBaseDataObject().put(PdfName.F, new PdfString(value));}
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfString

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.