Hi

Thanks for your comments

<<<it's a white space, and as such invisible (the most strikeout or underline 
fonts can void this precedence).>>
It is not just about the whitespace. The point is that width of line is more 
than rectangle width. So if you draw multiline text with left alignment, the 
left most letter(not whitespace) would be slightly cut. 

Now about removing whitespace from end of line. If you don't remove them from 
the end of line, you have to make the next line start with whitespace. My 
observation from office tools like MS Office, and Libreoffice is that they 
don't allow lines to start with whitespaces(Except for the first line). This is 
a cosmetic decision( but I guess it is common decision, the behaviour is 
already part of the function). But obviously we are losing some information 
from input string.
        
What about adding one more parameter to the arguments to decide whether lines 
should be allowed start with whitespaces(or trailing whitespaces should be 
skipped)?

Regards
Ali

-----Original Message-----
From: zyx [mailto:z...@litepdf.cz] 
Sent: Monday, July 31, 2017 12:57 PM
To: podofo-users@lists.sourceforge.net
Subject: Re: [Podofo-users] Fix issue in GetMultiLineTextAsLines()

On Fri, 2017-07-28 at 20:59 +0000, Jaseem Ali K T wrote:
> For this case  GetMultiLineTextAsLines() will push string1+" " to 
> first line. But its width is more than text area width, which is 
> wrong.

        Hi,
it's a white space, and as such invisible (the most strikeout or underline 
fonts can void this precedence).

> +                //skip the spaces appearing at the end of line
> +                while (IsSpaceChar(*(pszCurrentCharacter + 1)))
> +                    pszCurrentCharacter++;

I'm afraid that the function cannot do this. Simply because it doesn't have 
enough information about the meaning of the content it is supposed to split. It 
might be better to left the decision up to the caller, aka  let it remove 
trailing white space on their own, if needed. The use case for this is an ASCII 
graphics, like tables. You might break it this way in certain cases.
        Bye,
        zyx

-- 
http://www.litePDF.cz                                 i...@litepdf.cz

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to