Friday, March 23, 2012

PDF and new line

Here is a very funny problem and I searched, tried every method and cannot
figure this out.
Problem: If my field has carriage returns at the start and then some text
and then again carriage return, the HTML shows fine but when exported to PDF
start Carriage returns are not displayed.
Example:
Database value:
3 carriage return and this is text.
2 Carriege return and this is final text
HTML shows:
3 carriage return and this is text.
2 Carriege return and this is final text
PDF shows:
3 carriage return and this is text.
2 Carriege return and this is final text
NO INITAL carriage return in PDF but it does leave once there is some text.
Is this the rendering problem or a bug'
Note: I am not using RTRIM or TRIM anywhere.please help....
I need this resolved for today's build.
thanks,
Rahul
"RK" wrote:
> Here is a very funny problem and I searched, tried every method and cannot
> figure this out.
> Problem: If my field has carriage returns at the start and then some text
> and then again carriage return, the HTML shows fine but when exported to PDF
> start Carriage returns are not displayed.
> Example:
> Database value:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> HTML shows:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> PDF shows:
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> NO INITAL carriage return in PDF but it does leave once there is some text.
> Is this the rendering problem or a bug'
> Note: I am not using RTRIM or TRIM anywhere.|||I found it.
Replace(string, CHAR(13), CHAR(0)
PDF considers char(0), NULL ad adds a carriage return.
"RK" wrote:
> please help....
> I need this resolved for today's build.
> thanks,
> Rahul
> "RK" wrote:
> > Here is a very funny problem and I searched, tried every method and cannot
> > figure this out.
> >
> > Problem: If my field has carriage returns at the start and then some text
> > and then again carriage return, the HTML shows fine but when exported to PDF
> > start Carriage returns are not displayed.
> >
> > Example:
> >
> > Database value:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> >
> > HTML shows:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > PDF shows:
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > NO INITAL carriage return in PDF but it does leave once there is some text.
> > Is this the rendering problem or a bug'
> >
> > Note: I am not using RTRIM or TRIM anywhere.sql

No comments:

Post a Comment