Ask Your Question

Revision history [back]

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!!

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

this is code with c#, reference:

private void btConvertPDF_Click(object sender, RoutedEventArgs e) e)

    {
         if (m_xComponent != null) 
         {
             btFormula.Text = "Actions.CONVERTPDF";
             // XStorable to store the document
             XStorable xStorable = (XStorable)m_xComponent;

(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!!