How to convert Text file to PDF within Meridian

Hi, we have a software (Meridian Enterprise, a document management software) that uses ASPOSE to convert documents to PDF (The dll that are supplied from the manufacturer are: Aspose.Cells, Aspose.Diagram, Aspose.PDF, Aspose.Slides, Aspose.Words, version 22.4.0.0).
It works well with office files and image file but it doesn’t work with text file.
Am I missing something to be able to convert Text file to PDF?
Thanks

@pchabot You can use Aspose.Words to convert Text files to PDF. The code is simple:

Document doc = new Document("C:\\Temp\\in.txt");
doc.Save("C:\\Temp\\out.pdf");

Hi Alexey,
sorry for such a late response.
I have no idea how to do this. The software I use (Meridian from Accruent) uses Aspose (in this case Aspose.Words.dll) to convert files to PDF. But this is done through configuration and not programmation. What I mean is that I choose the file extension from a menu, and it will apply it to files stored in the application. The extension TXT is not available, and I cannot bypass the interface.
I do have access to create commands through a VBScript interface.
How would I do what you suggested in VBScript?
Thanks

@pchabot I am afraid I am not familiar with Meridian. From your description it looks like some kind of wrapper of Aspose.Words. If there is no TXT extension in your interface, it is required to add it or simply change extension of your input file to some known one. Upon loading document Aspose.Words automatically detect document format regardless the file extension.

Well, renaming the file to .doc, it generated the PDF (as you said it would) then I renamed it back to .txt

Yeah! I have a work around.

Big thank you

1 Like