Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfIndirectObject


        /*
          NOTE: This xref stream indirect object is purposely temporary (i.e. not registered into the file's
          indirect objects collection).
        */
        XRefStream xrefStream;
        PdfIndirectObject xrefStreamIndirectObject = new PdfIndirectObject(
          file,
          xrefStream = new XRefStream(file),
          xrefStreamEntry = new XRefEntry(indirectObjects.size(), 0, 0, XRefEntry.UsageEnum.InUse)
          );

View Full Code Here


        /*
          NOTE: This xref stream indirect object is purposely temporary (i.e. not registered into the file's
          indirect objects collection).
        */
        XRefStream xrefStream;
        PdfIndirectObject xrefStreamIndirectObject = new PdfIndirectObject(
          file,
          xrefStream = new XRefStream(file),
          xrefStreamEntry = new XRefEntry(indirectObjects.size(), 0, 0, XRefEntry.UsageEnum.InUse)
          );

        XRefEntry prevFreeEntry = null;
        for(PdfIndirectObject indirectObject : indirectObjects)
        {
          if(indirectObject.getDataObject() instanceof XRefStream)
          {
            /*
              NOTE: Existing xref streams MUST be suppressed,
              temporarily replacing them with free entries.
            */
            indirectObject = new PdfIndirectObject(
              file,
              null,
              new XRefEntry(
                indirectObject.getReference().getObjectNumber(),
                XRefEntry.GenerationUnreusable,
View Full Code Here

        index < xrefSize;
        index++
        )
      {
        // Current entry insertion.
        PdfIndirectObject indirectObject = indirectObjects.get(index);
        if(indirectObject.isInUse()) // In-use entry.
        {
          // Add in-use entry!
          appendXRefEntry(
            xrefInUseBlockBuilder,
            indirectObject.getReference(),
            stream.getLength()
            );
          // Add in-use entry content!
          indirectObject.writeTo(stream);
        }
        else // Free entry.
        {
          // Add free entry!
          appendXRefEntry(
            xrefBuilder,
            freeReference,
            index
            );

          // End current block!
          xrefBuilder.append(xrefInUseBlockBuilder);

          // Initialize next block!
          xrefInUseBlockBuilder.setLength(0);
          freeReference = indirectObject.getReference();
        }
      }
      // Add last free entry!
      appendXRefEntry(
        xrefBuilder,
View Full Code Here

    {
      PdfArray actionObjects = (PdfArray)baseDataObject;
      if(values.length < actionObjects.size())
      {values = (T[])new Object[actionObjects.size()];}

      PdfIndirectObject container = getContainer();
      for(
        int index = 0,
          length = actionObjects.size();
        index < length;
        index++
View Full Code Here

  {
    PdfArray itemObjects = (PdfArray)getBaseDataObject();
    if(values.length < itemObjects.size())
    {values = (T[])new Object[itemObjects.size()];}

    PdfIndirectObject container = getContainer();
    for(
      int index = 0,
        length = itemObjects.size();
      index < length;
      index++
View Full Code Here

  {
    PdfArray functionObjects = getBaseDataObject();
    if(values.length < functionObjects.size())
    {values = (T[])new Object[functionObjects.size()];}

    PdfIndirectObject container = getContainer();
    for(
      int index = 0,
        length = functionObjects.size();
      index < length;
      index++
View Full Code Here

  {
    PdfArray annotationObjects = getBaseDataObject();
    if(values.length < annotationObjects.size())
    {values = (T[])new Object[annotationObjects.size()];}

    PdfIndirectObject container = getContainer();
    for(
      int index = 0,
        length = annotationObjects.size();
      index < length;
      index++
View Full Code Here

        at object number 0 [PDF:1.6:3.4.3].
      */
      lastObjectNumber = 0;
      modifiedObjects.put(
        lastObjectNumber,
        new PdfIndirectObject(
          this.file,
          null,
          new XRefEntry(
            lastObjectNumber,
            XRefEntry.GenerationUnreusable,
View Full Code Here

    PdfDataObject object
    )
  {
    // Wrap the data object inside a new indirect object!
    lastObjectNumber++;
    PdfIndirectObject indirectObject = new PdfIndirectObject(
      file,
      object,
      new XRefEntry(
        lastObjectNumber,
        0,
View Full Code Here

  */
  public PdfIndirectObject addExternal(
    PdfIndirectObject object
    )
  {
    PdfIndirectObject indirectObject = importedObjects.get(object.hashCode());
    // Hasn't the external indirect object been imported yet?
    if(indirectObject == null)
    {
      // Register the clone of the data object corresponding to the external indirect object!
      indirectObject = add((PdfDataObject)object.getDataObject().clone(file));
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfIndirectObject

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.