Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

To recognize corrupt framemaker file using framemaker API

New Here ,
Mar 19, 2010 Mar 19, 2010

If I rename a framemaker book as .fm file and then I try to include this file as a component of another book, no pdf is generated on saving the book as pdf.

How can I make sure that a book file is not added as a component using framemaker API ( currently using fdk 6.0).

Thanks,

Asha Rayakar

TOPICS
Structured
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Mar 19, 2010 Mar 19, 2010

Asha,

I think I understand now. Somebody else renamed the file... you are just trying to catch the error in your code, right?

I tried to duplicate this scenario, but in my experiments, FrameMaker was smart enough to know what kind of file it was, regardless of the extension. So, here are just some ideas...

- If the file isn't actually "corrupt," you can use F_ApiGetObjectType() to find out whether it is a FO_Book, FO_Doc, or something else. If a document is corrupted, I don't know what that functio

...
Translate
Mentor ,
Mar 19, 2010 Mar 19, 2010

Hi Asha,

I don't understand your question. What exactly are you trying to do?


Russ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2010 Mar 19, 2010

Hi Russ,

A framemaker book file  (.bk) was renamed as (.fm). And when I open this file, it shows a one line entry of the path of the file in framemaker. I can add this as a component when creating a new book. However this should not be allowed as it is a corrupt framemaker file.

Are there any properties from which we can determine if a framemaker file (.fm) is actually a .bk file ?

Thanks,

Asha

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Mar 19, 2010 Mar 19, 2010
LATEST

Asha,

I think I understand now. Somebody else renamed the file... you are just trying to catch the error in your code, right?

I tried to duplicate this scenario, but in my experiments, FrameMaker was smart enough to know what kind of file it was, regardless of the extension. So, here are just some ideas...

- If the file isn't actually "corrupt," you can use F_ApiGetObjectType() to find out whether it is a FO_Book, FO_Doc, or something else. If a document is corrupted, I don't know what that function might return.

- If the file is corrupt, I would think that you should be able to query some kind of property to find that out. For example, maybe you could count the number of paragraph formats in the file. My guess is that a corrupt document will have significantly fewer than you would expect to see, if any at all.

Russ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines