- Offizieller Beitrag
Q: I need to convert an RTF file to PDF.
A: Using the library wRTF2PDF (WPCubed GmbH) you can convert RTF (but also HTML and TXT files) into PDF. You can also convert RTF to HTM or HTM to RTF or save each page in a document as an image file!
This all is possible in the new version wRTF2PDF V3.5 - please see the demo server http://www.rtf-net.com which shows life examples.
Load the file first and then export it to PDF:
Code
RTF2PDF wpdllint1 = new RTF2PDF();
try
{
wpdllint1.SetLicense("@FILE@mysecretpassword", "C:\\Windows\\rtflic.dat",0);
wpdllint1.Memo.LoadFromFile("afile.rtf",false,"");
wpdllint1.PDFCreator.PDFFile = "apdf_file.pdf";
wpdllint1.PDFCreator.Print();
}
finally
{
wpdllint1.Dispose();
}
Alles anzeigen
Please also see the manual at
http://www.wpcubed.com/manuals/pdfdotnet/
and the product page
http://www.wpcubed.com/products/rtf2pdf/index.htm