Hi there,
I've been a long time user of DynamicPDF and used it a lot with ASP a few years back. Now, I've successfully ported my biggest projects to ASP.NET and have had a wonderful time using the .NET version of DynamicPDF.
However, I've hit a bump in the road. I have a series of text sections of variable lengths to be added to the page. These sections contain some static labelling and items and I have absolutely no idea how to approach this manually. I was going to try and "code-my-way-out" by sending page x cords to a self-written function, but its overly complicated and there must be a simple way to do this?
To clarify the problem; several "areas" which include text, images and labelling of indeterminable height (prior to generation) that need to stack a-top of each other and fall onto additional pages as necessary without programming from me. Can it be done? How can it be done?
Help appreciated!
Kind regards
Chris
Dynamic Text Areas
Re: Dynamic Text Areas
Support · Mar 14, 2007Hello Chris,
You can add text of unknown length by using the TextArea page element where you can take care of the overflow text (text which does not fit in the given dimensions of the textarea) very easily using the GetOverflowTextArea method of the TextArea object. You can add this overflow text to a new page and you can do this in a loop until you have some overflow. You can refer to the Text Continuation
topic on our help documentaion.
In order to add images you will have to mention the X, Y coordinates on the page for the image. You will have to take care of the X, Y to add images, it is not possible to control the flow of images automatically.
Thanks,
ceTe Software Support Team.
Re: Dynamic Text Areas
Forum member · Mar 14, 2007Thanks for the prompt reply.
I found the textcontinuation section, but unfortunately it isn't quite as comprehensive for what I'm trying to achieve (it has saved my bacon in the past however!).
I'm going for the custom built co-ords system as the page is generated: complicated; yes, difficult to program; yes, scalable; no, does the job; yes :)
Thanks again.
Best
Chris
Re: Dynamic Text Areas
Forum member · Mar 14, 2007Actually, a further question if possible, how do I dynamically generate pages? When I do theItin.Pages.Add(thePage) I just get data over data plus an additional page of said data. Can I not just add a blank page then as I loop through add the elements too it?
Re: Dynamic Text Areas
Support · Mar 14, 2007Hello Chris,
Yes, you can add blank pages in runtime to the document without any problem. You will have to create a Page object when ever you require a new page and add it to the documents page collection. You can add any page elements to that page object. It looks some thing like this.
start a loop
Page page = new Page(); //create a new page object.
//add new contents to this page
document.pages.add(page); // Add this page to the document.
stop, loop until some condition.
You can refer to the Text Continuation
topic on our help documentaion which adds new pages at run time.
Thanks,
ceTe Software Support Team.
Re: Dynamic Text Areas
Forum member · Mar 14, 2007Hi there,
Just as I got the notification email, I had cracked it! ;)
Thanks again I think I'll be alright from here on.
Best
Chris