OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23-04-2006, 12:59
retchless
Guest
 
Posts: n/a
Default Carriage Returns aren't showing up

I'm working on a tool that uses Bridge2Java to interface a Java Servlet with CorelDRAW Scripting. The tool parses a Tab-Delimited Values file and fills in a CDR Template with values for the user to download. I'm having a hard time with carriage returns showing up when inserted into paragraph text boxes (I've tried with artistic text as well). It's no problem if a web form is used as the front-end, but when using a CSV, the carriage returns just don't appear! Do you have any advice?
Reply With Quote
  #2  
Old 23-04-2006, 15:15
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

maybe the problem is that some of CSV files are using only #13 or #10 and not both - which might be required (who knows) by CorelDraw (or what?) in order to see linebreak.
Try to reparse CSV and replace CR (or maybe there's a single LF) with CRLF

CR=chr 13, LF=chr 10
I would use (if it's possible):
writefile csv, replace(replace(replace(readFile(csv),vbCrLf,vbCr),vbLf,vbCr),vbCr,vbCrLf)
Reply With Quote
  #3  
Old 23-04-2006, 23:23
retchless
Guest
 
Posts: n/a
Default

Thanks for the advice! I added a java method that replaces all \n's with \r\n, and that worked. Good thinking!
Reply With Quote
  #4  
Old 24-04-2006, 09:56
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

In fact, all you need is '\r' [Chr(13)]. Line feed character ('\n', Chr(10)) is ignored by CorelDRAW.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:40.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com