How to change pdfbox configuration to generate XML preview by Libreoffice

cancel
Showing results for 
Search instead for 
Did you mean: 
miroslav
Customer

How to change pdfbox configuration to generate XML preview by Libreoffice

Hello,

I have a lot of XML document with unsupported characters (according pdfbox library) and I would like to generate preview for them. By default, generation is provided by the pdfbox library, which returns following errors:

java.lang.IllegalArgumentException: U+000A ('controlLF') is not available in this font Helvetica (generic: ArialMT) encoding: WinAnsiEncoding...

 if I change the mimetype to plain/text, the preview generation is provided by jodconverter and libreoffice, then everything is fine.

Is there any way to disable pdfbox to generate XML preview? Ideally replace it with libreoffice and set the same behavior as for mime type plain / test.

Thank you.

3 Replies
miroslav
Customer

Re: How to change pdfbox configuration to generate XML preview by Libreoffice

Any idea how to fix mentioned error? (char "Řř" in xml). It is possible to change default transofmation algorithm? 

EddieMay
Alfresco Employee

Re: How to change pdfbox configuration to generate XML preview by Libreoffice

Hi @miroslav 

I'm not sure if you've seen these SO threads - one, two?

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
miroslav
Customer

Re: How to change pdfbox configuration to generate XML preview by Libreoffice

Thank you for answer. I saw the websites. In my case, there is unsupported character "Ř" (according pdfbox documentation). I have to either change the code on the alfresco side or just not to use the pdfbox library and leave everything on libreoffice. I wonder if I'm able to somehow change the tool that generates preview for specific mimetype.....in case of emltopdf conversion, use libreoffice