Before, I used ITextSharp
to generate a PDF File in C# for Windows, and it worked perfectly, now that I need to compile it and run it in Windows store framework, i get errors: the major error comes from using System.IO.FileStream
, which doesn't exist in windows store API, is there another type do the same as System.IO.FileStream
in windows store app ?
Here the code I used before :
String mat;
System.IO.FileStream fs;
Document doc;
mat = textBox1.Text;
fs = new FileStream(mat + ".pdf", FileMode.Create, FileAccess.Write, FileShare.None);
doc = new Document();
PdfWriter writer = PdfWriter.GetInstance(doc, fs);
doc.Open();
String texto = richTextBox1.Text;
doc.Add(new Paragraph(texto));
doc.Close();
this.Hide();
iTextSharp is not directly compatible with windows store apps, the conversion work is not that much but it's not done. Have a look at iTextSharp-Monotouch for a possible workaround.