Is there a way to change 'width' of White Space character?

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Is there a way to change 'width' of White Space character?

Postby comgate3 » Wed Nov 13, 2013 2:55 am

(I found out that I should ask this question here, not on 'External program' board. So I moved my question)



Language : Java
OS : Windows 7 (maybe Ubuntu later)

Hi

I am writing a wrapper tool that uses UNO API to convert office documents to PDF docs.
Well basically, I just modified 'DocumentConverter' example in the OpenOffice SDK package. it works fine. it did convert office docs to pdf docs.

But the result PDF file doesn't look same when I opened the original office document (such as doc, docx, ppt, etc) with MS Office application.
The letter size is different, line spacing is different, and so on.

I am aware of rendering one specific document can be different with different applications (open office vs ms office)
so I thought maybe I could modify ANY settings regarding STYLE of documents so I could have somewhat more reasonable output. That is why I actually try to build a wrapper tool, but I don't see a way to do so in the example code. (of course...it's just a simple converter)

What I found that at least if I am able to change the 'width' of White space characater, then the output will shape more closer to the original document.

For example,
I wrote.. 'I am trying to write a program that fulfill my will' using MS Word and save it as 'test.docx'
and when I open 'test.docx' using OpenOffice Writer, I see the white spaces between words are smaller compared to when I opened it with MS Word. I tested with many other documents and white space characters were one of main reason to show different outputs.

I did hours of searching with keywords like 'width of blank space', 'change of blacnk space', 'white space', 'letter spacing' blah blah, but no luck.
I need to know if there is a way to change 'width' of White space character programatically!

Does anyone know how to?


Thank you for reading my question =)


--------------------------
1 Reply by RoryOF

: Why not tell your code to use PDF/A-1a?
Ji Jimm Youn
Apache Open office 3.4.1
Windows 7
comgate3
 
Posts: 3
Joined: Tue Nov 12, 2013 1:18 pm

Re: Is there a way to change 'width' of White Space characte

Postby comgate3 » Wed Nov 13, 2013 3:08 am

1 Reply by RoryOF
: Why not tell your code to use PDF/A-1a?


hm..I see what you meants by 'using PDF/A-1a'.
However, the problem I see already appears before exporting to PDF.
A document (such as test.docx) looks different when I open it with OpenOffice and I assume such different formatting and styling appears internally when I load the document using UNO bridging programatically.
so I am looking for codes, references, or tutorials that will help me to modify formats and styles of characters of a document loaded.
I found out that OpenOffice uses 'Tika' to parse documents, and 'Tika' uses all kinds of parsers, and maybe the parsers have processing/modifying functions. But i cannot find where I begins..
Ji Jimm Youn
Apache Open office 3.4.1
Windows 7
comgate3
 
Posts: 3
Joined: Tue Nov 12, 2013 1:18 pm


Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest