Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Importing Graphics via a MIF

0 views
Skip to first unread message

Arnis_...@adobeforums.com

unread,
Nov 10, 2006, 1:05:59 AM11/10/06
to
Richard,

Why do you have to recreate your templates when switching platforms?
That's one of the beauties of FM, the files are compatible across all
platforms.

Also, why are you writing MIF code (unless this is generated from a
specialized application like a database)? You can accomplish the same
actions directly and a lot easier in FM.

Q1) The snippet that you show is missing the import filter qualifier,
i.e. the <ImportHint string> after the <ImportObFileDI ...> statement.
The full specification for the import hint is defined in the MIF
Reference manual starting on p.113 (for FM7.2).

Q2) Yes it can and no conflict.

Q3) You're here aren't you? ;-)

Richard...@adobeforums.com

unread,
Nov 9, 2006, 11:21:15 PM11/9/06
to
Hi

I have a MIF which was originally written in v4.0. For the past 5 years I have been using it on a Mac on v5.5. With the removal of support for Mac we're moving to the PC and are looking at Framemaker 7.2. I am also a real novice in terms of writing code! So I have 3 questions.

Q1) To this end I'm trying to find out which bits of my existing code and templates work and which don't. I've found that I'll have to recreate all the templates but the existing MIF code that I have seems to be working perfectly except for the bit below. Can anyone tell me what's wrong with the code? It references the correct directory but will only display the grphic images as grey boxes.
<ImportObject <ImportObFileDI `<c\>Graphics<c\>Map 1233.TIFF' >
<Pen 15>
<Fill 7>
<ObColor `Black'>
<ShapeRect 18.0 mm 0.8 mm 28.0 mm 20.4 mm>
>#end of ImportObject

If, after copying in the MIF into my template (created on the Mac)I then Import by reference the same Map file, the image appears correctly and the file will save okay.

Q2) Related question. I have the MIF file which I copy into a template using the file>Import>Copy into document command. Can this MIF code contain within it an Import by Reference command? Would there be a conflict or does it not matter?

Q3) Where do I find the MIF gurus?

Many thanks

Richard

Richard...@adobeforums.com

unread,
Nov 12, 2006, 5:38:50 PM11/12/06
to
Arnis

Thanks for that.
Problem with the templates is that even though I have the correct fonts loaded on the PC, when I open the templates (created on a MAc) it can't see the fonts and replaces them with default Times fonts. I can change all the paragraph tags to the correct fonts, save and close then open and the template does see any of the font changes I have made and sets fonts back to default Times. Problem was raised on the Forum back in April and the suggestion there was recreate all the templates. If only Frame was truly cross-platform...........

And yes we use the MIF because we generate complex tables and text from a 4D database.

I have tried editing the MIF file to account for the code as displayed in the manual and I can get it to reference the correct directory and the MIF imports smoothly but I still get grey boxes, even though I have independently confirmed that the graphic images I'm referencing are perfect.

I'm stumpted!

Richard

Tim_M...@adobeforums.com

unread,
Nov 14, 2006, 12:08:02 AM11/14/06
to
Frame really is cross-platform, but it can't help itself if fonts of the same name are not present. Regarding fonts, I have some information that may be of help at <http://www.techknowledgecorp.com/help> then look in the left column for font topics. I suspect, however, that you have your preference "remember missing font names" enabled, so when you save your file, it does not save the new font associations with it.

Please tell us more about this "independently confirmed". Have you done a plain import on the same gray graphics?

Richard...@adobeforums.com

unread,
Nov 14, 2006, 12:54:40 AM11/14/06
to
Hi Tim

Thanks and what a great website and reference.

What I meant by "independently confirmed" was that I have the images stored within a directory and they open correctly when using a different software package. However, once I have copied in the MIF file and have a number of greyed boxes, if I select the greyed box and import by reference the same images appear there correctly. This was the basis of my earlier query concerning a MIF that is copied into a template and that MIF containing an Import by reference command.

Any assistance would be very welcome.

Have you much experience with working with MIFs that are written in an external software database product like 4D, Tim?

Richard

Arnis_...@adobeforums.com

unread,
Nov 14, 2006, 9:48:00 AM11/14/06
to
Richard,

>if I select the greyed box and import by reference the same images appear there correctly

That sounds like you don't have the correct Import hint (i.e. which
import filter FM should be using) specified in your MIF statement.

Can you post a snippet of the MIF code that imports one of these
greyed out graphics.

Richard...@adobeforums.com

unread,
Nov 14, 2006, 10:42:41 PM11/14/06
to
Arnis

Thanks for the advice.

Here's what the current code which imports fine on a Mac looks like.

<ImportObject <ImportObFileDI `<c\>Graphics<c\>Map 1233.TIFF' >
<Pen 15>
<Fill 7>
<ObColor `Black'>
<ShapeRect 18.0 mm 0.8 mm 28.0 mm 20.4 mm>
>#end of ImportObject

.....and you're correct in saying that it does not have the ImportHint line. Not being a programmer I'm unsure of the actual string I need to write in this line. I'm working on the assumption that if I import the current mif into my template, then remove the grey boxes and import my graphics by reference and then save the file as a MIF that should contain the correct code (?). I see from reading the manuals that I don't need the <ImportObFile > line because that's just for historical reference to version 1, but do I need the following two lines (which I've copied from the MIF that was saved as a result of doing this).

<ImportHint `0001FRAMTIFFWIN3 '>
<ImportObUpdater `TIFF'>

Would that be correct?

Thanks

Richard

Arnis_...@adobeforums.com

unread,
Nov 15, 2006, 12:29:15 AM11/15/06
to
Richard,

You've almost got it. If you want to import it by reference (the
preferred method), then you do *not* need the ImportObUpdater line.
This is mainly meant for OLE objects on Windows platforms or
subscribers on Macs. Also, the import hint string uses "WIN3" at the
end, which is for the obsolete Windows 3.1 platform. It really should
be WINT at the end. FYI, there also is an error in the documentation
at this point for the hint string. The manual lists PGRF to be used
for the internal filters, but it really is FRAM (as you see in the
exported MIF sample).

Also, you do not have the dpi for the image specified. So to be
certain that you get what you want, you should add a "<BitMapDpi
nnn>" entry, where the "nnn" is the required dpi.

So the correct MIF snippet should be:

<ImportObject
<ImportObFileDI `<c\>Graphics<c\>Map 1233.TIFF' >

<ImportHint `0001FRAMTIFFWINT '>


<Pen 15>
<Fill 7>
<ObColor `Black'>
<ShapeRect 18.0 mm 0.8 mm 28.0 mm 20.4 mm>

<BitMapDpi 300> #or whatever dpi you need
>#end of ImportObject

One further suggestion or question. Do you really want the background
fill of your images to be white or do you want it to be transparent
(i.e. no fill)? If you don't want a visible fill, then I would suggest
changing the fill line to 15, e.g. <Fill 15>.

Richard...@adobeforums.com

unread,
Nov 16, 2006, 12:07:40 AM11/16/06
to
Arnis

Thanks again but..

I have a typesetter who is working on Frame 7.2 and has altered her MIF code and has had success in importing a mif and it loading the graphics.

However, I'm working with Frame +SGML5.5 and it won't work. One of the problems as far as I can see is that it is the pathname that is causing me problems. It is very odd because once I have imported the MIF and it gives me the grey boxes and I replace these by importing by reference with the correct image, I am actually importing over a network and I have a path that is something like P:\Richard\ etc etc but the saved file in MIF format tells me that the path is c:\Graphics\ (the code that appears in the original MIF).

My thinking now is that I should reinstall 5.5 again and start from scratch.

Richard

Arnis_...@adobeforums.com

unread,
Nov 16, 2006, 9:01:38 AM11/16/06
to
It's not the installed version of FM that's the issue, though if
you're using anything less than v.5.5.6 on XP, it's not officially
supported by Adobe.

Using referenced files over a network can also be problematic (mainly
with performance issue), however if you've replaced the files and
saved the document, then the file path should be pointing to the new
location rather than the old one.

When you click on the newly imported image and select the Properties,
is the correct path listed?

Richard...@adobeforums.com

unread,
Nov 19, 2006, 10:50:38 PM11/19/06
to
If I import a graphic and select properties there is no referenced file.

I've been trying a few test to see if I can get anything to work. I've copied two bits of code below. The first is my original MIF file copied into a document and with the resulting gray squares I have replaced them by importing the graphic in by reference and saving the resulting file as a MIF.
Using the referenced path names from this file I have edited my MIF file to duplicate the path names and that is the second bit of code. This still imports a grey box, which object properties tells me has no referenced file.
I've tried importing the graphic from other other directories and checking the object properties to see if I get different referenced path names and I do. Editing the mif file to take account of the new paths and importing again will still result in grey squares, again unreferenced.

CODE CREATED BY FRAMEMAKER AFTER MANUALLY IMPORTING BY REFERENCE

<ImportObject <Unique 3472468>
<Pen 15>
<PenWidth 1.0 pt>
<Separation 0>
<ObColor `Black'>
<ImportObFileDI `<c\>Mortar.tiff'>
<ImportObFile `Mortar.tiff'>
<ImportHint `0001FRAMTIFFWIN3 '>
<ImportObUpdater `TIFF'>
<ShapeRect 15.0 mm 0.0 mm 47.8367 mm 27.17785 mm>
<BRect 15.0 mm 0.0 mm 47.8367 mm 27.17785 mm>
<BitMapDpi 300>
<FlipLR No>
> # end of ImportObject

This one is my edited version

<ImportObject <ImportObFileDI `<c\>Mortar.tiff'>
<ImportObFile `Mortar.tiff'>
<ImportHint `0001FRAMTIFFWIN3 '>
<ImportObUpdater `TIFF'>


<Pen 15>
<Fill 7>
<ObColor `Black'>

<ShapeRect 16.658 mm 4.121 mm 24.342 mm 13.758 mm>
<BitMapDpi 300>
> # end of ImportObject

Any advice?

Richard

Arnis_...@adobeforums.com

unread,
Nov 20, 2006, 12:54:51 PM11/20/06
to
Richard,

Check the file name. Are you sure it's ".tiff" instead of ".tif"?
Otherwise it looks like it should be working.

Richard...@adobeforums.com

unread,
Nov 20, 2006, 10:07:51 PM11/20/06
to
Arnis

Thanks. I've checked the file extension and it's correct. I've altered my directories again to be as short as possible and the MIF (bit of code below) imports without stopping to ask for the graphic file, but it still gives the grey box.

<ImportObject <ImportObFileDI `<v\>c:<c\>Frame from Mac<c\>Mortar.tiff ' >
<ImportObFile `../Frame from Mac/Mortar.tiff '>
<ImportHint `0001FRAMTIFFWIN3 '>


<Pen 15>
<Fill 7>
<ObColor `Black'>

<ShapeRect 16.658 mm 4.121 mm 24.342 mm 13.758 mm>
<BitMapDpi 300>
> # end of ImportObject

I wonder if the import filter is loaded correctly. Do you know which file in the Frame filter folder is used to filter tiff files?

I have also tried using a GIF file instead of a TIFF file, which Frame tells me uses a TIFF filter but still no success.
The oddest thing though is when I manually import the graphics and save as a Mif, then open it again, either by double clicking on the filename or by importing by reference into the template the image is there. It's using the copy into document command that never seems to work, but that's the only way I can get the MIF into the template.

Richard

Arnis_...@adobeforums.com

unread,
Nov 20, 2006, 11:58:24 PM11/20/06
to
Richard,

What is the context that you're importing the MIF into - a text frame,
an anchored frame, or ... ?

Does the created MIF just contain the entire document required, i.e.
the text, tables frames and graphics?

Note: what options are you using when importing the MIF. If you select
the "Copy into Document", then the referenced file in the MIF file
will also be copied into the FM document and stored internally as a
Frame facet, not as a referenced external file. Depending upon the
graphic, this can be huge, as FM internally stores images as
uncompressed rgb rasters. Huge internal graphics can be a resource
drain and FM will suffer amnesia when trying to display these to
protect the rest of the contents of the file.

If you want to maintain the referenced link, you have to supply the
full context of the import (i.e. the anchored frame in the text flow)
in your MIF statements.

Finally, have you tried the reverse process of opening the MIF file
and then importing the template formats into that?

Richard...@adobeforums.com

unread,
Nov 21, 2006, 1:07:26 AM11/21/06
to
Arnis

I appreciate your time

Answering the questions you raised

What is the context that you're importing the MIF into - a text frame,
an anchored frame, or ... ?

Into a rectangle

<Rectangle <Pen 7>
<Fill 7>
<PenWidth 0.5 pt>
<ObColor `White'>
<Overprint No >
<ShapeRect 15.0 mm 0.0 mm 28.0 mm 22.0 mm>
> # end of Rectangle

Does the created MIF just contain the entire document required, i.e.
the text, tables frames and graphics?

It is virtually one section of a book and contains a section header, along with a graphic, text in frames and a number of different tables

Note: what options are you using when importing the MIF. If you select
the "Copy into Document", then the referenced file in the MIF file
will also be copied into the FM document and stored internally as a
Frame facet, not as a referenced external file. Depending upon the
graphic, this can be huge, as FM internally stores images as
uncompressed rgb rasters. Huge internal graphics can be a resource
drain and FM will suffer amnesia when trying to display these to
protect the rest of the contents of the file.

The MIF file is copied into document, if I try to import it by reference, Frame will crash. The graphic I am importing is tiny and all of the graphics I use are small as well.

If you want to maintain the referenced link, you have to supply the
full context of the import (i.e. the anchored frame in the text flow)
in your MIF statements.

Okay, I'll give that some thought as to how I go about this

Finally, have you tried the reverse process of opening the MIF file
and then importing the template formats into that?

No, I'd didn't know that was an option. I'll try that tomorrow

Thanks

Arnis

Richard

Arnis_...@adobeforums.com

unread,
Nov 21, 2006, 10:58:42 AM11/21/06
to
Richard,

A Rectangle isn't a valid container for other objects. It's just a
graphic (like a line, polygon, circle, etc.) available as drawing
objects in FM. You need to import the image file into some kind of
"frame" (anchored, graphic or text).

If your MIF file contains virtually all of the contents required, just
try opening your MIF instead of importing it. Other than some
formatting issues, are all of the objects there as expected. If not,
then you've got to go over the MIF coding.

As an aside, there are easier (albeit they require some $$) and more
robust ways to do what you're trying to accomplish. There are
third-party database publishing tools available for FM that will take
care of the nitty-gritty details (of MIF or other formatting). You
might want to check out Miramo, PatternStream, Pectora or UniMerge.
You can also look into exporting your data tagged as XML and using
structured FM to format it.

0 new messages