How can convert odt to pdf ?

Nov 3, 2011 at 9:37 AM
Edited Nov 3, 2011 at 10:24 AM

How can convert odt to pdf / a?

this not work.. can pdf but can not pdf/a

 public static object[] GetPdfArgs(OfficeDocument document)
        {
            object[] arguments = new object[1];
            if (null != System.Configuration.ConfigurationManager.AppSettings[OpenOffice.Pdf_A])
            {
                try
                {
                    if (true == Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings[OpenOffice.Pdf_A]))
                    {
                        arguments = new object[2];
                        object[] pdfVersionPropertyValue = new object[1];
                        // Set PDF Version to A-1
                        // 0 for PDF 1.4  1 for PDF/A-1
                        pdfVersionPropertyValue[0] = OpenOffice.Manager.CoreReflection.CreateProperty("SelectPdfVersion", 1);

                        arguments[1] = OpenOffice.Manager.CoreReflection.CreateProperty("FilterData", pdfVersionPropertyValue);
                    }
                }
                catch (Exception ex)
                {
                    arguments = new object[1];
                }
            }
            if (document.DocType == DocType.Writer)
                arguments[0] = OpenOffice.Manager.CoreReflection.CreateProperty("FilterName", "writer_pdf_Export");
            else if (document.DocType == DocType.Calc)
                arguments[0] = OpenOffice.Manager.CoreReflection.CreateProperty("FilterName", "calc_pdf_Export");
            else
                arguments[0] = OpenOffice.Manager.CoreReflection.CreateProperty("FilterName", "writer_pdf_Export");

            return arguments;
        }

Coordinator
Nov 3, 2011 at 11:38 AM

I havn't tried this on my own so far.

Also I'm currently quite low on time for this project, so I currently can't investigate this issue.

If you find a solution by yourself it would be nice if you post it here.

Reinhard.