I’d like to convert OpenOffice file types (ODT, ODS, ODP) to PDF without any temporary storage of the unencrypted documents using LibreOffice.
Browsing the manual I see there’s a Convert.ToPdf method.
My understanding is for OpenOffice file types this needs an external app, in this case LibreOffice installed and a printer for pdfTron.
This is fine but the documents what we’re converting are sensitive and we don’t want to store them unencrypted even for temporarily purposes.
We also have a license for BCL easyPdf 8 which is as far as I know also part of apryse now. Maybe we can somehow leverage that? I see that is supports memory streaming for MS Office and OpenOffice but couldn’t make it work with LibreOffice in my first try. If you have any documentation/sample for using LibreOffice, please let me know.
So my question is: is there any flow/solution for OpenOffice documents using LibreOffice where we don’t need to save the file we want to convert but provide it as a memory stream either in pdfTron or BCL easyPdf?
1 Like
Hello,
Using BLC, the current version of SDK 8 should support LibreOffice just fine, but LibreOffice needs to be installed before our SDK, as the SDK will scan for the version at installation and map to it.
You will the be able to use OpenOfficePrintJob
to work with LibreOffice, and use PrintOut3
to work purely in memory (no temp files will be created).
Please note that easyPDF only works with the 32-bit version of LibreOffice.
Can you please give this a try and see if this woks for you? Let us know if you have any questions.
1 Like
Hello,
Thanks, I did try the following based on your suggestion:
- uninstall
BCL easyPDF SDK 8 OEM
- install
LibreOffice_24.2.4_Win_x86.msi
(also tried with LibreOffice_7.6.7_Win_x86.msi
)
- install
BCL easyPDF SDK 8 OEM
- use
OpenOfficePrintJob
and PrintOut3
After that I still get an error: BCL.easyPDF.Printer.PrinterException: 'Conversion failed'
Nothing more specific what went wrong.
Can you please help me further investigate what might be the issue?
1 Like
Hello,
Are you running this in a Server Environment? If so please ensure that you have configured the SDK’s Loader Service as per our ‘Preparing Your Server’ chapter in the SDK User Manual.
Once that has been verified, can you please try using the normal PrintOut
method first to make sure the SDK is properly interacting with the Host Application?
Then, In order to get the most detailed error, please provide us the PrintJob.ConversionResultMessage
and PrintJob.PrinterResultMessage
properties after the conversion is done.
Thank you in advance for the additional information.
1 Like
Hello,
Thank you.
I’m currently running it in my development environment locally with a test application and with MS Office and OpenOffice it’s working, only LibreOffice is causing issue.
Can you point me where the SDK User Manual can be found?
I tried out PrintOut
and gives the same error.
The error details are the following both for PrintOut
and PrintOut3
:
Not sure if it helps but in the Task Manager I see that it starts LibreOffice and it stays there until I let the break for the thrown exception thrown go in the VisualStudio debugger.
1 Like
Thank you for the details. Can you please check to make sure the Print Spooler is running and our SDK Printer appears under “Devices and Printers”? If there’s any warnings or errors in the Printer, try clearing the Printer Queue. If that does not help, please try reinstalling the SDK.
1 Like
Thanks.
Print Spooler is running, I can see the SDK Printer and there’s nothing in the queue.
Tried to reinstall the SDK but did not help.
1 Like
@shakthi124 Waiting for further instructions how to proceed. Thanks!
1 Like
Hello, I see that you opened a support ticket with our portal. We will continue the discussion there. Thank you.
1 Like