Hi there,
I have a Byte [ ] of word document containing Text, Images and Tables.
I want to generate and store PDF file into the database table.
I am able to generate the PDF file using below code but Image is not exporting to PDF.
Text and Tables exported successfully.
public void ByteArrayToPdf()
{
Byte[] Document = null;
RadDocument document = new RadDocument();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
RtfFormatProvider providerRtf = new RtfFormatProvider();
string path = Path.GetTempPath() + "\\TempFile.doc";
Document = File.ReadAllBytes(path);
using (FileStream stream = File.Open(path, FileMode.Open))
{
document = providerRtf.Import(stream);
}
Document = pdfFormatProvider.Export(document);
if (Document != null && Document.Length > 0)
{
SaveDocumentToDB(Document);
}
}
Please help.
Thanks
Anup Indurkar
I have a Byte [ ] of word document containing Text, Images and Tables.
I want to generate and store PDF file into the database table.
I am able to generate the PDF file using below code but Image is not exporting to PDF.
Text and Tables exported successfully.
public void ByteArrayToPdf()
{
Byte[] Document = null;
RadDocument document = new RadDocument();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
RtfFormatProvider providerRtf = new RtfFormatProvider();
string path = Path.GetTempPath() + "\\TempFile.doc";
Document = File.ReadAllBytes(path);
using (FileStream stream = File.Open(path, FileMode.Open))
{
document = providerRtf.Import(stream);
}
Document = pdfFormatProvider.Export(document);
if (Document != null && Document.Length > 0)
{
SaveDocumentToDB(Document);
}
}
Please help.
Thanks
Anup Indurkar