Examples of PdfException


Examples of br.net.woodstock.rockframework.document.pdf.PDFException

      document.close();
      writer.close();

      return new DocumentOutput(new ByteArrayInputStream(outputStream.toByteArray()));
    } catch (IOException e) {
      throw new PDFException(e);
    } catch (DocumentException e) {
      throw new PDFException(e);
    }
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.office.pdf.PDFException

      writer.close();
      reader.close();

      return outputStream.getInputStream();
    } catch (IOException e) {
      throw new PDFException(e);
    } catch (DocumentException e) {
      throw new PDFException(e);
    }
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.office.pdf.PDFException

      document.close();
      writer.close();

      return outputStream.getInputStream();
    } catch (IOException e) {
      throw new PDFException(e);
    } catch (DocumentException e) {
      throw new PDFException(e);
    }
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.office.pdf.PDFException

      reader.close();

      return CollectionUtils.toArray(list, InputStream.class);
    } catch (IOException e) {
      throw new PDFException(e);
    } catch (DocumentException e) {
      throw new PDFException(e);
    }
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.office.pdf.PDFException

      writer.close();

      String text = new String(outputStream.toByteArray());
      return text;
    } catch (IOException e) {
      throw new PDFException(e);
    }
  }
View Full Code Here

Examples of org.axsl.pdf.PdfException

        buffer.append("%" + PDFDocument.BINARY_COMMENT  + PDFObject.EOL);
        final byte[] bytes = PDFObject.bufferToByteArray(buffer);
        try {
            this.outputStream.write(bytes);
        } catch (final IOException e) {
            throw new PdfException(e);
        }
        this.position += bytes.length;
    }
View Full Code Here

Examples of org.axsl.pdf.PdfException

          by the table's length */

        try {
            this.position += outputXref(this.outputStream);
        } catch (final IOException e) {
            throw new PdfException(e);
        }

        /* construct the trailer */
        final StringBuilder buffer = new StringBuilder();
        buffer.append(getTrailerContent());
        buffer.append("startxref" + PDFObject.EOL);
        buffer.append(xrefPosition + PDFObject.EOL);
        buffer.append("%%EOF" + PDFObject.EOL);

        /* write the trailer */
        byte[] trailer;
        try {
            trailer = buffer.toString().getBytes(PDFDocument.ENCODING);
        } catch (final UnsupportedEncodingException ue) {
            trailer = buffer.toString().getBytes();
        }
        try {
            this.outputStream.write(trailer);
        } catch (final IOException e) {
            throw new PdfException(e);
        }
    }
View Full Code Here

Examples of org.axsl.pdf.PdfException

        final PDFDestination existingDestination = destinations.get(
                name);
        if (existingDestination == null) {
            destinations.add(name, destination);
        } else {
            throw new PdfException("Named destination already exists: " + name);
        }
    }
View Full Code Here

Examples of org.axsl.pdf.PdfException

     */
    public PDFFontFileStream(final PDFDocument doc, final FontUse font)
            throws PdfException {
        super(doc);
        if (! font.getFont().isEmbeddable()) {
            throw new PdfException("Can't create PDFFontFileStream for a Font "
                    + "that is not embeddable.");
        }
        this.font = font;
    }
View Full Code Here

Examples of org.axsl.pdf.PdfException

        }
        final byte[] bytes = PDFObject.stringToByteArray(pdf);
        try {
            stream.write(bytes);
        } catch (final IOException e) {
            throw new PdfException(e);
        }
        return bytes.length;
    }
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.