Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatted text

Status
Not open for further replies.

dingleberry

Programmer
Dec 13, 2002
143
US
Hi,
I'm trying to create a job seeker site, and have been having a hard time figuring out how to enable users to copy a Microsoft word or word perfect or any word processed document like their resume, upload it to my database formatted, and then when they want to view it or change it, have it echod out to their browser in a formatted fashion with carriage returns and special characters in place. Any ideas on how to do this? The resume is being stored as a text field in mysql.

Thanks,
Dan
 
use the html <pre> tags Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Hello:

Carrage returns:
#
$alt=str_replace(&quot;\n\r\n&quot;, &quot;<p>&quot;, $row[your table]);
$alt=nl2br($alt);

print &quot;$alt&quot;;
#

as far as &quot;special characters&quot; you're going to have to be a little more specific
 
How about special characters like

bullets?

I'm noticing that with bulleted text, it's being saved as ,,h but when I do a

$resume = str_replace(&quot;,,h&quot;, &quot;<li>&quot;, $resume);

I'm not finding success. Any pointers?

Thanks,
dan
 
Wait one second, it's being saved as what appears to be

,,h however upon further inspection, it's not. It's acually not two commas but instead a baseline &quot; symbol. I have no idea what it is, so I copied it from &quot;view source&quot; into a text editor, and pasted it into vi and a period appeared. A period??? I'm confused. Has anyone seen this behavior? Is this some wierd ascii character that I don't know about?
 
I do not know this behavior, but for what it's worth, the best system I've seen for this works as such...

user uploads word file to server
server uses a backend plugin to convert it to PDF, then the PDF is displayed.

I'm sure a .doc to .pdf converter exists out there, and then that way it's in one nice easy cross-platform, printable document that you don't have to mess with, or worry what happens when the user resizes their window or any of those other text layout issues which HTML just isn't so good at...

-Rob
 
do you have a link or something so that I/we can see what's going on?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top