Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PRStream


   * @param parser  the OCGParser
   * @param page    the page dictionary of the page that needs to be parsed.
   * @throws IOException
   */
  private void parse(OCGParser parser, PdfDictionary page) throws IOException {
    PRStream stream = (PRStream)page.getAsStream(PdfName.CONTENTS);
    PdfDictionary resources = page.getAsDict(PdfName.RESOURCES);
    parser.parse(stream, resources);
  }
View Full Code Here


    public void parse(PRStream stream, PdfDictionary resources) throws IOException {
      baos = new ByteArrayOutputStream();
      properties = resources.getAsDict(PdfName.PROPERTIES);
      xobj = new HashSet<PdfName>();
      PdfDictionary xobjects = resources.getAsDict(PdfName.XOBJECT);
      PRStream xobject;
      PdfDictionary oc;
      PdfString ocname;
    if (xobjects != null) {
      // remove XObject (form or image) that belong to an OCG that needs to be removed
      for (PdfName name : xobjects.getKeys()) {
        xobject = (PRStream)xobjects.getAsStream(name);
        oc = xobject.getAsDict(PdfName.OC);
        if (oc != null) {
          ocname = oc.getAsString(PdfName.NAME);
          if (ocname != null && ocgs.contains(ocname.toString())) {
            xobj.add(name);
          }
View Full Code Here

TOP

Related Classes of com.itextpdf.text.pdf.PRStream

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.