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

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

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

origin: apache/pdfbox

private void updateByValue(String value)
{
  getCOSObject().setName(COSName.V, value);
  // update the appearance state (AS)
  for (PDAnnotationWidget widget : getWidgets())
  {
    if (widget.getAppearance() == null)
    {
      continue;
    }
    PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance();
    if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value))
    {
      widget.setAppearanceState(value);
    }
    else
    {
      widget.setAppearanceState(COSName.Off.getName());
    }
  }
}
origin: apache/pdfbox

PDAppearanceEntry normalAppearance = ap.getNormalAppearance();
COSDictionary normalAppearanceDict = (COSDictionary) normalAppearance.getCOSObject();
normalAppearanceDict.setItem(COSName.Off, createRadioButtonAppearanceStream(document, widget, false));
normalAppearanceDict.setItem(COSName.YES, createRadioButtonAppearanceStream(document, widget, true));
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: com.github.lafa.pdfbox/pdfbox

private void updateByValue(String value)
{
  getCOSObject().setName(COSName.V, value);
  // update the appearance state (AS)
  for (PDAnnotationWidget widget : getWidgets())
  {
    PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance();
    if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value))
    {
      widget.getCOSObject().setName(COSName.AS, value);
    }
    else
    {
      widget.getCOSObject().setItem(COSName.AS, COSName.Off);
    }
  }
}
origin: org.apache.pdfbox/pdfbox

private void updateByValue(String value) throws IOException
{
  getCOSObject().setName(COSName.V, value);
  // update the appearance state (AS)
  for (PDAnnotationWidget widget : getWidgets())
  {
    if (widget.getAppearance() == null)
    {
      continue;
    }
    PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance();
    if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value))
    {
      widget.setAppearanceState(value);
    }
    else
    {
      widget.setAppearanceState(COSName.Off.getName());
    }
  }
}
org.apache.pdfbox.pdmodel.interactive.annotationPDAppearanceEntrygetCOSObject

Popular methods of PDAppearanceEntry

  • <init>
    Constructor for reading.
  • getAppearanceStream
    Returns the entry as an appearance stream.
  • 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

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JFrame (javax.swing)
  • Join (org.hibernate.mapping)
  • 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