Rendering tab stops

Hi,
 
I have an asp textbox which users are allowed to enter tabs in (\t)
 
When I then try to pdf the information the \t is replaced with spaces, or at least thats what it looks like.
 
I am using a PDFLightTable, and assigning a string array to its datasource, which contains by text with tabs
 
Any ideas if this is possible to render tabs correctly?
 
Thanks
Emma

7 Replies

GM Geetha M Syncfusion Team July 19, 2012 09:33 AM UTC

Hi Emma,

Thank you for your interest in Syncfusion products.

I am afraid that I am not clear about the requirement. Could you please let us know what you intend to see when tabstop is inserted? Also, it would be helpful if you send us a simple sample.

Regards
Geetha


EC Emma Clarke July 19, 2012 12:14 PM UTC

We have a control which allows tabs i.e.
Hello    1
             2
When i try to pass the string to the PdfLightTable, which in this case, would be something like:
"Hello\t1\t\t2"
It ignores the \t and replaces it with spaces, the text then does not line up correctly.
 
I can produce a syncfusion word doc and it works correctly but if i try to convert it to a pdf, using the syncfusion assembly, it again ignore the tabs. If i save a word doc created by my app and then manually save it as a pdf, i.e. through Word, it works.
 
Can you explain a reason for this behaviour or if there is anyway for me to resolve it?
 
Thanks


EC Emma Clarke July 19, 2012 12:36 PM UTC

this article suggests that it should be possible but it doesn't work for me
 
I have attached a cut down version of my code.
 
Thanks

 

 

 

 

 

 

 

 

 

 



CreatePDFwithTabs_c37498bc.zip


DY Deivaselvan Y Syncfusion Team July 26, 2012 04:20 AM UTC

Hi Emma,

Thank you for your update.

We have prepared a sample to illustrate your requirement of inserting a Tab stop into word document and directly convert into PDF. Please do find the sample and the converted PDF from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.

Regards,
Deiva selvan



Sample_800dd687.zip


EC Emma Clarke July 30, 2012 11:51 AM UTC

Hi,
 
I'm afraid you solution is worse, although the code looks the same it completely ignore the \r\n and just doesn't print anything after it. Attached is the result I get from running the VS2010 version.
 
Thanks


DoctoPDF_586860db.zip


EC Emma Clarke July 31, 2012 09:07 AM UTC

Hi I have been playing around with this, and the only way i can get it to work is if i first save the word doc to temp and then read it back into to convert it. I have attached my solution.
 
Can you explain why this would be or anyway around it as it is very clunky?
 
Thanks
Emma


SampleModified_9d51e457.zip


DY Deivaselvan Y Syncfusion Team August 3, 2012 10:17 AM UTC

Hi Emma,

Thank you for your update.

We are not able to reproduce the mentioned tab preservation issue with the given sample. We have prepared the video illustration for the same. Please do find the video illustration from the attachment.

Please let us know if you have any other questions.

Regards,
Deiva selvan



Video_c69d8861.zip

Loader.
Up arrow icon