2 Replies Latest reply on Apr 27, 2009 1:11 PM by Mario1233

    Page count - how do you get it?

    Mario1233

      I'm using the Java API. How do I get the page count of a pdf?  There is a method on the "FormsResult" object called getPagecount() but it does not work - always returns 1!! (BTW, I am using formsClient.renderPDFForm() - which returns the FormsResult)

        • 1. Re: Page count - how do you get it?
          pguerett Level 6

          Are you rendering a dynamic PDF? If so, by default it is rendering on the client hence the server never renders it and the FormResult object does not get all of the data. If you set the RenderAtClient option to no then it will render server side and the FormsResult will be complete.

           

          Paul

          • 2. Re: Page count - how do you get it?
            Mario1233 Level 1

            Thanks Paul,

             

            That's what I suspected but did not pursue it as I wasn't sure it would help but now that you have validated my thinking I'll give it a shot.

             

            One problem is that setting RenderAtClient = NO throws errors on the server (

            java.lang.NoClassDefFoundError: com/adobe/printSubmitter/service/OutputServiceImpl$4

            at com.adobe.printSubmitter.service.OutputServiceImpl.transformPDFWithSMT(

             

            OutputServiceImpl.java:477)

             

             

            ).

             

            That's why I never had it set to "NO".