GoupDocs.Conversion takes too much time

We tried GroupDocs.Conversion and we have some questions:

We tried to convert a simple text file (~ 200 bytes) to PDF. But for some reason this process takes around 20 seconds. We tried the code from this example:

The Aspose.Total worked much faster.

Some additional info regarding our attempts:

License: we tried to run the above example without license and with a temporary license

Version: we tried the nuget package GroupDocs.Conversion v.23.11.0

Environment: we tried it locally (Windows machine) and on AWS (Lambda function)

We even tried to convert the same text file via online converter (Online file conversion | Free GroupDocs Apps). But this conversion taken around 2-3 minutes.

Could you let us know is it possible to improve this process somehow?

1 Like

@vitalykoltsov

Could you please share the problematic TXT file? Do you face this issue for all ~200 bytes text files or with a specific one?

Hi @atir.tahir

Not sure I understood your question. We tried just one single text file only that takes around 200 bytes.

I have attached an archive with this file.

Thanks.

input_text_sample.zip (240 байтов)

1 Like

@vitalykoltsov
This issue is reproduced at our end. Therefore, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONNET-6532

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@vitalykoltsov

Please try following code to improve conversion performance:

// Specify the path to the source text file
const string source = "input_text_sample.txt";

// Open the source text file as a FileStream using FileMode.Open
using (var fs = new FileStream(source, FileMode.Open))
{
    // Create a Converter instance with a custom loading function and WordProcessingLoadOptions for text files
    using (var converter = new Converter(() => fs, () => new WordProcessingLoadOptions
    {
        // Set the format to WordProcessingFileType.Txt for text files
        Format = WordProcessingFileType.Txt
    }))
    {
        // Specify conversion options, e.g., PDF conversion
        var options = new PdfConvertOptions();

        // Perform the conversion from text to PDF and save the result as "converted.pdf"
        converter.Convert("converted.pdf", options);
    }
}

The issues you have found earlier (filed as CONVERSIONNET-6532) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov