Embarcadero c++ Cannot save text to .pdf -
i using embarcadero c++ , reading text file. want save text .pdf document. appreciated! in advance... see code below!
memtext ->clear(); ansistring oneline; ansistring wordsfile = "orcle_daily_14aug12.txt"; tstreamreader *stread = new tstreamreader(wordsfile); while (!stread->endofstream) { oneline = stread->readline(); memtext->lines->add(oneline); } stread->close(); ansistring twoline; ansistring wordsfile2 = "daily_report.pdf"; tstreamwriter *stwrite = new tstreamwriter(wordsfile2, false); (int ln = 0; ln <= memtext->lines->count-1; ln++) { oneline = memtext->lines->strings[ln]; stwrite->writeline(oneline); } memtext->scrollbars = ssvertical; stwrite->close();
Comments
Post a Comment