Package com.itextpdf.text.exceptions

Examples of com.itextpdf.text.exceptions.IllegalPdfSyntaxException


   * (Part of the RichMediaContent.)
   * @param  configuration  a configuration dictionary
   */
  public PdfIndirectReference addConfiguration(RichMediaConfiguration configuration) throws IOException {
    if (configurations == null)
      throw new IllegalPdfSyntaxException(
        "You can't add configurations to reused RichMediaContent.");
    PdfIndirectReference ref = writer.addToBody(configuration).getIndirectReference();
    configurations.add(ref);
    return ref;
  }
View Full Code Here


   * (Part of the RichMediaContent.)
   * @param  ref    a reference to a RichMediaConfiguration
   */
  public PdfIndirectReference addConfiguration(PdfIndirectReference ref) throws IOException {
    if (configurations == null)
      throw new IllegalPdfSyntaxException(
        "You can't add configurations to reused RichMediaContent.");
    configurations.add(ref);
    return ref;
  }
View Full Code Here

   * (Part of the RichMediaContent.)
   * @param  view  a view dictionary
   */
  public PdfIndirectReference addView(PdfDictionary view) throws IOException {
    if (views == null)
      throw new IllegalPdfSyntaxException(
        "You can't add views to reused RichMediaContent.");
    PdfIndirectReference ref = writer.addToBody(view).getIndirectReference();
    views.add(ref);
    return ref;
  }
View Full Code Here

   * (Part of the RichMediaContent.)
   * @param  ref  a reference to a view dictionary
   */
  public PdfIndirectReference addView(PdfIndirectReference ref) throws IOException {
    if (views == null)
      throw new IllegalPdfSyntaxException(
        "You can't add views to reused RichMediaContent.");
    views.add(ref);
    return ref;
  }
View Full Code Here

   */
  public void setAction(PdfObject action) {
    if (action instanceof PdfDictionary || action instanceof PdfIndirectReference)
      put(PdfName.A, action);
    else
      throw new IllegalPdfSyntaxException(
        "An action should be defined as a dictionary");
  }
View Full Code Here

  public void setParams(RichMediaParams params) {
    if (flash) {
      put(PdfName.PARAMS, params);
    }
    else {
      throw new IllegalPdfSyntaxException("Parameters can only be set for Flash instances.");
    }
  }
View Full Code Here

    /**
     * Starts the writing of text.
     */
    public void beginText() {
      if (inText) {
        throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.text.operators"));
      }
      inText = true;
        state.xTLM = 0;
        state.yTLM = 0;
        content.append("BT").append_i(separator);
View Full Code Here

    /**
     * Ends the writing of text and makes the current font invalid.
     */
    public void endText() {
      if (!inText) {
        throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.text.operators"));
      }
      inText = false;
        content.append("ET").append_i(separator);
    }
View Full Code Here

     */
    public void restoreState() {
        content.append("Q").append_i(separator);
        int idx = stateList.size() - 1;
        if (idx < 0)
            throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.save.restore.state.operators"));
        state = stateList.get(idx);
        stateList.remove(idx);
    }
View Full Code Here

        int n = 1;
        if (layerDepth != null && !layerDepth.isEmpty()) {
            n = layerDepth.get(layerDepth.size() - 1).intValue();
            layerDepth.remove(layerDepth.size() - 1);
        } else {
          throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.layer.operators"));
        }
        while (n-- > 0)
            content.append("EMC").append_i(separator);
    }
View Full Code Here

TOP

Related Classes of com.itextpdf.text.exceptions.IllegalPdfSyntaxException

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.