Tabnine Logo
PDAppearanceEntry.getAppearanceStream
Code IndexAdd Tabnine to your IDE (free)

How to use
getAppearanceStream
method
in
org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceEntry

Best Java code snippets using org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceEntry.getAppearanceStream (Showing top 12 results out of 315)

origin: apache/pdfbox

private PDAppearanceContentStream getAppearanceEntryAsContentStream(
     PDAppearanceEntry appearanceEntry, boolean compress) throws IOException
{
  PDAppearanceStream appearanceStream = appearanceEntry.getAppearanceStream();
  setTransformationMatrix(appearanceStream);
  // ensure there are resources
  PDResources resources = appearanceStream.getResources();
  if (resources == null)
  {
    resources = new PDResources();
    appearanceStream.setResources(resources);
  }
  return new PDAppearanceContentStream(appearanceStream, compress);
}

origin: apache/pdfbox

/**
 * Returns the appearance stream for this annotation, if any. The annotation state is taken into account, if
 * present.
 */
public PDAppearanceStream getNormalAppearanceStream()
{
  PDAppearanceDictionary appearanceDict = getAppearance();
  if (appearanceDict == null)
  {
    return null;
  }
  PDAppearanceEntry normalAppearance = appearanceDict.getNormalAppearance();
  if (normalAppearance == null)
  {
    return null;
  }
  if (normalAppearance.isSubDictionary())
  {
    COSName state = getAppearanceState();
    return normalAppearance.getSubDictionary().get(state);
  }
  else
  {
    return normalAppearance.getAppearanceStream();
  }
}
origin: apache/pdfbox

if (appearance != null && appearance.isStream())
  appearanceStream = appearance.getAppearanceStream();
origin: org.verapdf/pdfbox-validation-model

private static void addAllAppearances(PDAppearanceEntry appearance, List<PDAppearanceStream> list) {
  if (appearance == null) {
    return;
  }
  if (appearance.isStream()) {
    PDAppearanceStream appearanceStream = appearance.getAppearanceStream();
    if (appearanceStream != null) {
      list.add(appearanceStream);
    }
  } else {
    for (PDAppearanceStream appearanceStream : appearance.getSubDictionary().values()) {
      if (appearanceStream != null) {
        list.add(appearanceStream);
      }
    }
  }
}
origin: com.github.lafa.pdfbox/pdfbox

private PDAppearanceContentStream getAppearanceEntryAsContentStream(PDAppearanceEntry appearanceEntry) throws IOException
{
  PDAppearanceStream appearanceStream = appearanceEntry.getAppearanceStream();
  setTransformationMatrix(appearanceStream);
  return new PDAppearanceContentStream(appearanceStream);
}

origin: org.verapdf/pdfbox-feature-reporting

private Set<String> getAppearanceEntryDependencies(PDAppearanceEntry entry, COSBase entryLink) {
  Set<String> res = new HashSet<>();
  if (entry.isStream()) {
    res.add(getAppearanceStreamDependencies(entry.getAppearanceStream(), entryLink));
  } else {
    for (Map.Entry<COSName, PDAppearanceStream> mapEntry : entry.getSubDictionary().entrySet()) {
      res.add(getAppearanceStreamDependencies(mapEntry.getValue(),
          ((COSDictionary) entry.getCOSObject()).getItem(mapEntry.getKey())));
    }
  }
  return res;
}
origin: org.verapdf/pdfbox-validation-model

private void addContentStreamsFromAppearanceEntry(COSBase appearanceEntry, List<PDContentStream> appearances) {
  if (appearanceEntry != null) {
    PDAppearanceEntry newAppearance = new PDAppearanceEntry(appearanceEntry);
    if (newAppearance.isStream()) {
      addAppearance(appearances, newAppearance.getAppearanceStream());
    } else {
      Map<COSName, PDAppearanceStream> subDictionary = newAppearance.getSubDictionary();
      for (PDAppearanceStream stream : subDictionary.values()) {
        addAppearance(appearances, stream);
      }
    }
  }
}
origin: com.github.lafa.pdfbox/pdfbox

/**
 * Returns the appearance stream for this annotation, if any. The annotation state is taken into account, if
 * present.
 */
public PDAppearanceStream getNormalAppearanceStream()
{
  PDAppearanceDictionary appearanceDict = getAppearance();
  if (appearanceDict == null)
  {
    return null;
  }
  PDAppearanceEntry normalAppearance = appearanceDict.getNormalAppearance();
  if (normalAppearance == null)
  {
    return null;
  }
  if (normalAppearance.isSubDictionary())
  {
    COSName state = getAppearanceState();
    return normalAppearance.getSubDictionary().get(state);
  }
  else
  {
    return normalAppearance.getAppearanceStream();
  }
}
origin: org.apache.pdfbox/pdfbox

/**
 * Returns the appearance stream for this annotation, if any. The annotation state is taken into account, if
 * present.
 */
public PDAppearanceStream getNormalAppearanceStream()
{
  PDAppearanceDictionary appearanceDict = getAppearance();
  if (appearanceDict == null)
  {
    return null;
  }
  PDAppearanceEntry normalAppearance = appearanceDict.getNormalAppearance();
  if (normalAppearance == null)
  {
    return null;
  }
  if (normalAppearance.isSubDictionary())
  {
    COSName state = getAppearanceState();
    return normalAppearance.getSubDictionary().get(state);
  }
  else
  {
    return normalAppearance.getAppearanceStream();
  }
}
origin: com.github.lafa.pdfbox/pdfbox

void handleOpacity(float opacity) throws IOException
{
  if (opacity < 1)
  {
    PDExtendedGraphicsState gs = new PDExtendedGraphicsState();
    gs.setStrokingAlphaConstant(opacity);
    gs.setNonStrokingAlphaConstant(opacity);
    
    PDAppearanceStream appearanceStream = appearanceEntry.getAppearanceStream();
    
    PDResources resources = appearanceStream.getResources();
    if (resources == null)
    {
      resources = new PDResources();
      appearanceStream.setResources(resources);
      contentStream.setResources(resources);
    }
    contentStream.setGraphicsStateParameters(gs);
  }
}

origin: org.apache.pdfbox/pdfbox

if (appearance != null && appearance.isStream())
  appearanceStream = appearance.getAppearanceStream();
origin: com.github.lafa.pdfbox/pdfbox

if (appearance != null && appearance.isStream())
  appearanceStream = appearance.getAppearanceStream();
org.apache.pdfbox.pdmodel.interactive.annotationPDAppearanceEntrygetAppearanceStream

Javadoc

Returns the entry as an appearance stream.

Popular methods of PDAppearanceEntry

  • <init>
    Constructor for reading.
  • getCOSObject
  • getSubDictionary
    Returns the entry as an appearance subdictionary.
  • isStream
    Returns true if this entry is an appearance stream.
  • isSubDictionary
    Returns true if this entry is an appearance subdictionary.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now