[PDFNet] How do I convert any doc, docx, rtf, html, xml document to PDF ?

Q: I am interested in a conversion tool, that can convert any doc,
docx, rtf, html, xml document to PDF. Can I use PDFNet for this?
--------------
A: You can use PDFNet to to convert from MS Office, rtf, plan text,
image formats or any printable format to PDF via 'pdftron.PDF.Convert'
namespace. The current 'unoffical' build of PDFNet (http://
www.pdftron.com/IDR49A9-B29D/PDFNet.zip) also supports direct import
from Office 2007 SP2 or Office 2010 without the need to go through a
virtual printer driver, which results in greater perfromance and
quality.

As a starting point, please take a look at Convert sample project:
  http://www.pdftron.com/pdfnet/samplecode.html#Convert

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com

Q: . I'm trying to convert a DOCX to XPS and I'm getting the error
below. Please advise...

string sPDFNetPrinter = "PDFTron Creator";
PDFNet.Initialize();
foreach (klPage klp in currentDocument.Pages) {
  if (pdftron.PDF.Convert.RequiresPrinter(klp.FullName)) {
    if (!pdftron.PDF.Convert.Printer.IsInstalled(sPDFNetPrinter)) {
       pdftron.PDF.Convert.Printer.Install(sPDFNetPrinter);
    }
  }

  pdftron.PDF.Convert.ToXps(klp.FullName,klp.Document.FullName +
klp.Name + ".XPS");
}

Exception: Message: An error occurred while converting the file.
Detailed
error: Unable to find application to convert file to pdf Conditiona
...

What file formats do not require the pdftron::PDF::Convert::Printer to
convert to XPS?
----------------
A: By default PDFNet is not using virtual printer driver to convert
from DOCX to PDF, however you need to have MS Office installed on the
machine. This typically results in better output than going through a
virtual printer driver.

In case you are running on Windows 7, you could perform DOCX to PDF
conversion without MS Office installed. In this case you would need to
install PDFNet Printer using pdftron.PDF.Convert.Printer.Install()
[based on error I assume you are not running on Win 7].

What file formats do not require the pdftron::PDF::Convert::Printer
to convert to XPS?

PDFNet can convert directly from MS Office (if Office is installed).
There is also direct conversion support for PDF to XPS, EMF, and
various image formats (TIF, BMP, PNG, JPEG, GIF, HDPhoto, etc). Other
formats are converted through a printer driver.

Please let me know if this helps and if you have any other questions.

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com