Export to PDF and CSS

PDF and CSS formats require special attention, as they can be saved to, but not loaded from. The problem is that if you save a file as PDF, you cannot load it back in for further editing. CSS will not even save the text contained in a document, but only the formatting.

The best way to circumvent this is to create a seperate Export... menu item in addition to Save and Save As..., and keep the document in its original format when exporting it to a non-editable format. Note that, unlike Save As..., Export... does not change the file name and type.

[C#]
private void mnuFile_Export_Click(object sender, System.EventArgs e)
{
    textControl1.Save(TXTextControl.StreamType.AdobePDF);
}
[Visual Basic]
Private Sub mnuFile_Export_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_Export.Click
    TextControl1.Save(TXTextControl.StreamType.AdobePDF)
End Sub
[Delphi]
procedure Form1.mnuFile_Export_Click(sender: System.Object; e: System.EventArgs);
begin
    TextControl1.Save(TXTextControl.StreamType.AdobePDF);
end;

<< Previous