1 Reply Latest reply on Jun 14, 2006 2:40 PM by Newsgroup_User

    fileIO and linebreaks

      Hi everyone,
      I'm having a problem editing PDF-files in Director. I managed to generate a PDF-file that's split up into layers as a template. So I have a background layer that is a picture, and a forground layer that is text. So now I should be able to save a PDF-document which has gamestatus and the name of a winner in it by using the sourcecode. But for some reason fileIO ignores my linebreaks, so my PDF-document is nothing else than a huge line of characters. Acrobat is now unable to recognize it.
      Does anybody know, what to do?
      Thanks a lot it advance...
        • 1. Re: fileIO and linebreaks
          Level 7
          How are you adding linebreaks to the string you're writing with FileIO?
          Are you using Director's RETURN constant? FileIO (the latest version)
          has a writeReturn() method that takes a platform symbol parameter
          (#unix, #macintosh or #windows) that you can use to add
          platform-specific linebreaks/carriage-returns. Or you can create your
          own variable and use it instead of Director's RETURN constant:
          CRLF = numToChar(13) & numToChar(10)
          -- ...
          tString = tString & CRLF & "more text..."