Is there a way I can create my pdf from the variables returned in a soap call to the mainframe? I can do it by creating labels holding each variable but I'm having trouble with paging. It's not a text area or anything so I'm not sure how to do it.
Here's my scenerio, there are three section with labels with data in them. This takes up about half of the first page. Then I have a table that is dynamic. Then I have four comment sections after the table and they can be different sizes. How can I incorporate the paging into this?
Creating pdf from soap mainframe call
Re: Creating pdf from soap mainframe call
Support · Mar 24, 2006Hello,
Yes, you can build a PDF document out of any text (coming from any location) and you do not need to know how much text or the actual size of the text ahead of time. But what you do need to do is logically keep track of how much space is left on your current page so that you will know whether or not you have room to add the next element or not.
So for instance, when adding the first sections (as you have described) you should use TextAreas to add the dynamic text to the page and not Labels. Using the TextArea you will be able to determine how much height is required to add the text to the page before you actually add it. Or with the TextArea you are also able to add the text to the page and then check to see how much height it took to fit that text on the page so that you will know where the next element you want to add should begin. Labels do not have the ability to do this.
Once you have added the first sections to the page (keeping track of where you are on the page or if you have had to flow to another page keeping track of where you are on that page) you will now be able to determine where your table information will need to start. At this point you will also know how much room you have left on the page. So from this you can determine whether you want to place it at the bottom of that page, start a new page and place it on the new one or if you want to split it up and put what will fit on the bottom of the first page and flow the rest onto the next page.
Use the above logic as a guideline for creating the type of report that you have mentioned.
Thanks,
ceTe Software Support Team