Performance Tips Via Remote From C#/UNO Bridge

I’m writing a C# application that converts documents (or rather any files that LibreOffice can support) to PDFs.

It seems the general consensus is automate LibreOffice as a single instance/single thread headless mode.

However I feel LibreOffice performance could be better. Are there ways to tweaks LibreOffice to perform better in automation mode? I read of Memory/Graphic setting tweaks you can do, but will they even help in ‘headless’ mode?

Thank you!

Hi @S.Lock,

It’s possible that there are some options to tweak LO performance, but based on the paucity of Answers to this question, nobody on the Ask site knows much about them :slight_smile:

I suggest that you chat with the developers via the mailing list, IRC, etc. They might have some suggestions for you:

i do this,and can convert to PDF with C#
using lib cli_basetypes, cli_cppuhelper,cli_oootypes,cli_ure,cli_uretypes in SDK

this is code with c#, reference:

private void btConvertPDF_Click(object sender, RoutedEventArgs e)

    {
        if (m_xComponent != null) 
        {
            btFormula.Text = "Actions.CONVERTPDF";
            // XStorable to store the document
            XStorable xStorable = (XStorable)m_xComponent;
            string sURL = currentDirectory + @"\" + System.IO.Path.GetFileName(openFileDialog1.FileName) + @".pdf";
            btFormula.Text = sURL;
            PropertyValue[] propertyValue = new PropertyValue[1];
            propertyValue[0] = new unoidl.com.sun.star.beans.PropertyValue();
            propertyValue[0].Name = "FilterName";
            propertyValue[0].Value = new uno.Any("writer_pdf_Export");
            xStorable.storeToURL(PathConverter(sURL), propertyValue);
        }           
    }

hope you funny!!