How to use Java to get the content of the text layer in the .fm file
Copy link to clipboard
Copied
I have a requirement that bothers me very much, to extract the text layer of a .fm file. The condition is that Java, C/C++, python can be used. But I can't extract by opening framemaker.
I tried to find some relevant Maven packages to extract, but unfortunately none of the relevant packages were found.
Copy link to clipboard
Copied
Why would you not just use FM to open the file? Or have someone send you the .mif version so you can copy the text out of it directly?
Copy link to clipboard
Copied
Or save it in text format.
Copy link to clipboard
Copied
right now the situation is I'm being required to convert .fm files to mif. files without FramMaker, so is there any solution for that?😢
Copy link to clipboard
Copied
If this is a one-time deal, download the trial version of FM, and process file content as desired.
If this is a secure-environment situation where you can't even do that, Mordac may win this round.
Can you get the FM authors to give you a PDF to copy from, or a hardcopy to scan to OCR?
Copy link to clipboard
Copied
Thank you for your answer, this is a requirement in my work, which requires writing a series of Java codes to realize the function of extracting text layers.
It is not necessary to obtain the content of the text layer of the .fm file under this condition. If I can convert the .fm to the .pdf format, I can also extract the text through a series of APIs in the .pdf file.
Is there a way to convert .fm files through some jar packages without using FrameMaker?
Your answer was helpful to me whether it solved the problem or not.
Copy link to clipboard
Copied
.fm (and .book) files are essentially in a proprietary Adobe binary format. The data structures aren't documented (and I know nothing about them). They change with each major release of the code. People have reversed-engineered these structures, but most have given up on the task churn, as it's much easier to deal with MIF.

