I am trying to attach a TEXT file into an ODT file, so that when the ODT is exported as a PDF, the TEXT file is attached within the PDF (just like one can attach a file using Adobe Acrobat), and have a link or icon to click that opens the attached text file. When the PDF is opened – and that link or icon is clicked, this should lead to the TEXT file opening in the Operating System's default text application.
The reason for this is that I am writing a beginner's help guide using OpenOffice Writer with the aim of the finished product being a stand-alone PDF file.
Everything is going well except for the issue of presenting Long Lines of code (spanning up to 5 lines) that the reader of the help guide will copy, and then paste at a Windows Command prompt. An Example of what needs to be pasted (actual code is much longer) is:
Code: Select all
C:> ProgramName.exe -Command01 -Command02 -Command03 -Command04 -Command05 -Command06 -Command07 -Command08 -Command09 -Command10 -Command11 -Command12 etc.
When the ODT is exported as a PDF – the text of long commands like above cannot be copied from the PDF without Line Breaks (a known issue with PDF files). So my thought is to attach a TEXT file that contains the Command Line code.
I have tried to embed the TEXT file by inserting it as an OLE Object, but have had no success.
I would appreciate some suggestions on how this can be done (without resorting to using Adobe Acrobat).