Package com.lowagie.text.exceptions

Examples of com.lowagie.text.exceptions.IllegalPdfSyntaxException


    */
   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


    */
   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 = (GraphicState) stateList.get(idx);
      stateList.remove(idx);
   }
View Full Code Here

         n = ((Integer) 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

    */
   public void endMarkedContentSequence()
   {
      if (mcDepth == 0)
      {
         throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.marked.content.operators"));
      }
      --mcDepth;
      content.append("EMC").append_i(separator);
   }
View Full Code Here

    */
   public void sanityCheck()
   {
      if (mcDepth != 0)
      {
         throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.marked.content.operators"));
      }
      if (inText)
      {
         throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.text.operators"));
      }
      if (layerDepth != null && !layerDepth.isEmpty())
      {
         throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.layer.operators"));
      }
      if (!stateList.isEmpty())
      {
         throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.save.restore.state.operators"));
      }
   }
View Full Code Here

    /**
     * Starts the writing of text.
     */
    public void beginText() {
      if (inText) {
        throw new IllegalPdfSyntaxException("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("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("Unbalanced save/restore state operators.");
        state = (GraphicState)stateList.get(idx);
        stateList.remove(idx);
    }
View Full Code Here

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

TOP

Related Classes of com.lowagie.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.