Examples of PdfString


Examples of org.pdfclown.objects.PdfString

        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

Examples of org.pdfclown.objects.PdfString

      )
    {
      /*
        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

Examples of org.pdfclown.objects.PdfString

      )
    {
      /*
        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

Examples of org.pdfclown.objects.PdfString

      )
    {
      /*
        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

Examples of org.pdfclown.objects.PdfString

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

Examples of org.pdfclown.objects.PdfString

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

Examples of org.pdfclown.objects.PdfString

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

Examples of org.pdfclown.objects.PdfString

    @see #getValue()
  */
  public void setValue(
    Object value
    )
  {getBaseDataObject().put(PdfName.V, new PdfString((String)value));}
View Full Code Here

Examples of org.pdfclown.objects.PdfString

    Pages pages = document.getPages();

    // 2. Inserting page destinations...
    Names names = document.getNames(); if(names == null){document.setNames(names = new Names(document));}
    NamedDestinations destinations = names.getDestinations(); if(destinations == null){names.setDestinations(destinations = new NamedDestinations(document));}
    destinations.put(new PdfString("First page"), new LocalDestination(pages.get(0)));
    if(pages.size() > 1)
    {
      destinations.put(new PdfString("Second page"), new LocalDestination(pages.get(1), Destination.ModeEnum.FitHorizontal, new Float[]{0f}));

      if(pages.size() > 2)
      {destinations.put(new PdfString("Third page"), new LocalDestination(pages.get(2), Destination.ModeEnum.XYZ, new Float[]{50f,null,null}));}
    }

    // (boilerplate metadata insertion -- ignore it)
    buildAccessories(document,"Named destinations","manipulating named destinations");
View Full Code Here

Examples of org.pdfclown.objects.PdfString

    byte[] text
    )
  {
    super(
      SimpleOperator,
      new PdfString(text)
      );
  }
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.