public override void SaveFileAs(string fileName, FileType type)
{
// step 1: creation of a document-object
iTextSharp.text.Document myDocument = new iTextSharp.text.Document(PageSize.A4.Rotate());
try
{
// step 2:
// Now create a writer that listens to this doucment and writes the document to desired Stream.
PdfWriter.GetInstance(myDocument, new FileStream(fileName, FileMode.CreateNew));
// step 3: Open the document now using
myDocument.Open();
// step 4: Now add some contents to the document
myDocument.Add(new iTextSharp.text.Paragraph(parsedFile.contentRaw));
}
catch (iTextSharp.text.DocumentException de)
{
Console.Error.WriteLine(de.Message);
}
catch (IOException ioe)
{
Console.Error.WriteLine(ioe.Message);
}
myDocument.Close();
}