|
Rank: Member Groups: Member
Joined: 3/6/2012 Posts: 19
|
Hi.
I have to render pdf with one block of AcmBlock then HtmlToPdfConverter and so on. I have checked with AcmContent and AcmRender, they doesn't take any start position. How can i give start position to a AcmRender or AcmContent like i can give to HtmlToPdfConverter in HtmlToPdfOptions.StartPosition. Is there any workaround for problem like this?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please check AcmRender's constructor.
Thanks
|
|
Rank: Member Groups: Member
Joined: 3/6/2012 Posts: 19
|
Hi
AcmRender's constructor takes position to start rendering from. I have a data where i need to render by using AcmRender and HtmlToPdf Converter. Problem i have is how would i find out where i have to start rendering next and if page needs to be shifted or not. Also as i mentioned earlier, every time i have to render a new paragraph i want to start it from next page if i can not be rendered completely on my last/previous page. i tried checking height every time i have to render next paragraph.
Thanks! Rahul
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You should use HTML to PDF converter if you want to have more control with pages. If you must use AcmRender, then you will need to do "trial run" to determine whether it fits in your current page. If it doesn't, then you run it a second time on the new page. You can not rely on the paragraph height. There is no such thing as "paragraph height" ---- the same paragraph can have a different height if the paragraph overflows to the next page.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 3/6/2012 Posts: 19
|
Hi, thanks for the prompt reply.
Even if i use only HTML to PDF converter, how would i know that whether a paragraph will render on my current page completely or not. and how would I know that i need to change or shift to next page now, because if i keep on rendering my paragraph will break up in between the pages which i dont want. also my data is unpredictable with height, so i can not determine the pre height for my all paragraphs.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
You don't. You use page-break-inside:avoid on the paragraph to avoid it being split over multiple pages. Take a look of the HTML to PDF converter paging options: http://www.essentialobjects.com/doc/4/htmltopdf/paging.aspxIt will be much easier for your case than using AcmRender directly. Thanks
|
|
Rank: Member Groups: Member
Joined: 3/6/2012 Posts: 19
|
That worked.. Thanks!
|
|