Welcome Guest Search | Active Topics | Sign In | Register

Mixture of AcmBlock and HtmlToPdf converter Options
master83
Posted: Friday, May 4, 2012 6:45:46 AM
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!
eo_support
Posted: Friday, May 4, 2012 9:01:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please check AcmRender's constructor.

Thanks
master83
Posted: Wednesday, May 9, 2012 12:44:12 PM
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
eo_support
Posted: Wednesday, May 9, 2012 12:50:34 PM
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!
master83
Posted: Wednesday, May 9, 2012 12:56:12 PM
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!
eo_support
Posted: Wednesday, May 9, 2012 1:00:17 PM
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.aspx

It will be much easier for your case than using AcmRender directly.

Thanks
master83
Posted: Wednesday, May 9, 2012 3:32:57 PM
Rank: Member
Groups: Member

Joined: 3/6/2012
Posts: 19
That worked.. Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.