Hey Syed,
I am not a main contributor but couldn't you handle this problem
differently?
Since you are formatting the document and inputting the string you could
decide how many characters per page. Take a look at your string buffer(s)
get a total count and decide how many per page you require. Throw a small
string check near the end to make sure you aren't clipping words (if
desired) and then build the pages that way.
For instance say your string buffer has a size of 2048, and you know its
1024 per page, then you'd have 2 pages. The check would be something like
you get to the 1024 character, see if it is a . ? ! white-space or line
break and if expand to the right to find one of those character first. I
would do that to avoid words being split between pages.
The other option I see, is depending on how you're handing the line breaks
keep a count of those. If you have one on every line have a counter and if
the counter hits a certain threshold then start a new page.
Sorry I can't provide any code to show you since what I use this for has to
deal more with placing images in set location but I end up generating the
pages dynamically depending on the number of images.
Regards,
-Richard
On Fri, Apr 17, 2015 at 12:25 PM, Syed Khaja Moinuddin <
khajamoinuddi...@gmail.com> wrote:
> Thanks Leonard.
>
> I have handled <br> tags but facing difficult to create pages dynamically
> as i dont see any API which can tell how many characters can fit in a line
> by taking Font style , font size, font type ..
>
> It would be much appreciated if you can share any example to create pages
> dynamically in case of Text.
>
> Thanks & Regards,
> Syed Khaja Moinuddin,
>
> On Fri, Apr 17, 2015 at 6:21 PM, Leonard Rosenthol <lrose...@adobe.com>
> wrote:
>
>> No – you will need to do your own page breaking and <br> handling.
>>
>> From: Syed Khaja Moinuddin
>> Date: Saturday, April 11, 2015 at 11:48 PM
>> To: "podofo-us...@lists.sf.net"
>> Subject: [Podofo-users] podofo: multipage creation
>>
>> Hello all,
>>
>> I'm trying to create pdfstreamdocument with standard page size as A4
>> and passing lengthy text (which can cover upto 4 ~5 pages).
>>
>> So, my questions are :
>> 1. Can the pages will be created dynamically depend on text length.
>> 2. Are their any filters supported in podofo to convert <br> into next Or
>> new line automatically ?. (assume <br> is part of text passed into
>> pdfpainter::DrawMultiline Or DrawText API.
>>
>>
>> Regards,
>> Syed Moinuddin.
>>
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users