Converting code using Aspose.PDF to use Aspose.Words

Hi,
I have some code using Aspose.pdf v.6.5 that generates a PDF file. Now I need to change it so it outputs a Word file. It is currently using the Aspose.Pdf.Generator namespace. I thought it would be a simple matter of changing it to Aspose.Words.Generator and necessary code changes, but that namespace doesn’t exist in the latest version 11 of Aspose.Words.
Do I need to use v6.5 of Aspose.Words? I would try it but I don’t see it available as a download. Should this be an easy task? Any other tips for converting code using aspose.pdf to use aspose.words appreciated.
Thanks,
David

Hi David,

Thanks for your inquiry.

No, you can’t convert a Pdf document to Word format by using Aspose.Words. Please note that Aspose.Words is a class library that enables your applications to perform a great range of document processing tasks. Aspose.Words supports conversion from DOC, DOCX, RTF, HTML, OpenDocument to PDF, XPS, EPUB and to other Word formats. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®.

Moreover, I feel your problem is more related to Aspose.Pdf, I will move your request in Aspose.Pdf forum. My colleagues from Aspose.Pdf component team will answer you shortly.

Best regards,

Hi David,

Thanks for using our products.

Aspose.Pdf for .NET supports the feature to convert PDF files to DOC format. Please visit the following link for required information on Convert PDF file into DOC format

In case you encounter any issue or you have any further query, please feel free to contact.

Hi,Sorry I wasn’t more clear on what I’m trying to do. I am not trying to convert a PDF file to a Word file. I have some code that creates a PDF file using Aspose.pdf. I would like to modify the code to create a Word file instead of a PDF file. For example, here’s a code snippet using Aspose.pdf:

using Aspose.Pdf.Generator;
using Table = Aspose.Pdf.Generator.Table;
...
// Instantiate an object PDF
Pdf pdf = new Pdf();
pdf.IsPageNumberForDocument = false;
Section sectionCoverSheet = pdf.Sections.Add(); 
Section section = pdf.Sections.Add();
section.ID = "main";
section.IsPageNumberRestarted = true;

How can I modify this code to generate a Word file?
Thanks,
David

DavidSF:
Hi,Sorry I wasn’t more clear on what I’m trying to do. I am not trying to convert a PDF file to a Word file. I have some code that creates a PDF file using Aspose.pdf. I would like to modify the code to create a Word file instead of a PDF file. For example, here’s a code snippet using Aspose.pdf:
using Aspose.Pdf.Generator;
using Table = Aspose.Pdf.Generator.Table;

// Instantiate an object PDF
Pdf pdf = new Pdf();
pdf.IsPageNumberForDocument = false;
Section sectionCoverSheet = pdf.Sections.Add();
Section section = pdf.Sections.Add();
section.ID = “main”;
section.IsPageNumberRestarted = true;
How can I modify this code to generate a Word file?

Hi David,
Thanks for sharing the details. As Aspose.Words for .NET supports the generation of Word documents, so I am moving this thread to respective forum so that my fellow workers from respective team will share the required information.

Hi David,

Thanks for the additional information. I believe, the following articles outline the topics you’re looking for:
https://docs.aspose.com/words/net/working-with-sections/
https://docs.aspose.com/words/net/working-with-tables/

Please let me know if I can be of any further assistance.

Best regards,

Hi David,

Just to clarify, Aspose.Pdf which works with PDF file format is a separate product from Aspose.Words, which works with Microsoft Word document formats. If you wish to create a document that is exported to Word formats then you will need to use the Aspose.Words API to achieve this instead of the Aspose.PDF API.

Note that Aspose.Words can also export any document loaded to PDF format.

Thanks,