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

Anchored Frame constraint on opening xml file

Guest
Jul 29, 2008 Jul 29, 2008
I'm using the DITA application provided with FM8 on WinXP. A curious situation arises with graphics (gifs) that are read into an anchored from, particularly when the graphic is large; the width is being constrained to 612pt, which is distorting the image, and then affects (narrows) the specified width of the image in the xml.

Where is that constraint coming from, and how can I remove it? It's not represented in the xml source, and I'm not seeing a setting in FM.

Thanks for any help
Bruce
TOPICS
Structured
788
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 ,
Jul 29, 2008 Jul 29, 2008
Hi Bruce...

Are your images actually distorted or just cropped? By default anchored frames have the "cropped" setting enabled, which will keep images from extending beyond the text column width. To disable cropping, add the following rule to your image element rule in the read/write rules file ..

fm property cropped value is "0";

This and other DITA/FM tips are available here ..

http://kb.leximation.com/dfm/

Cheers,

...scott

Scott Prentice
Leximation, Inc.
www.leximation.com
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
Guest
Jul 29, 2008 Jul 29, 2008
Ah, I was wondering where to set that cropped value, thanks. But, that didn't solve my issue. It still reads in the graphic, restricts it to 612pt width, and writes it out as such, distorting the display.

It did occur to me that 612 / 72 = 8.5, the printer paper width, but changing to landscape didn't help, either. So, I'm not sure what's cooking.

I'll keep looking, but any further suggestions greatly appreciated.

Thanks
Bruce
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
Community Beginner ,
Jul 30, 2008 Jul 30, 2008
Bruce,

As far as I know, when you import a graphic, Frame creates an anchored frame large enough to hold the graphic, BUT does not allow the anchored frame to extend beyond the boundaries of the paper. So, if you first set the paper to landscape and then insert the graphic file, Frame creates an anchored frame that is no wider than 11".

Are you sure that the graphic is being distorted? If you right-click the graphic and select Object Properties, the dialog box should show 100% in the scale by box. IF the graphic is indeed distorted, this box will be empty.

So, you will have to scale the graphic after it is in the Frame file. OR, add a read/write rule (if one exists) that does some scaling during the import. OR write an XSLT transformation that calculates the scaling factor and sets an attribute to the factor, which a read/write rule uses to scale the graphic.

Van
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
Guest
Jul 30, 2008 Jul 30, 2008
Thanks, Van.<br /><br />Yes, I figured that constraint should be due to the paper size, so switched the orientation to landscape. The graphic itself is 738 wide, so at 72dpi that should be 10.25, which fits in the 11" paper. Making that adjustment, resetting the dpi to 72 (which then shows 100% scaling), and saving the file, the xml comes out:<br /><br /><p><image height="592" width="738" align="center" placement="break"<br /> href = "hello1.gif" /></p><br /><br />So far so good. Closing and reloading the file, verifying that the print setting still has the paper in landscape (is there another place to set this?) and looking at the graphic, the width is again constrained to 612, the dpi is unknown and the percent scaling is empty (I didn't realize that was an actual indicator of distortion, so thank you). Saving the file again, without readjusting the graphic, produces:<br /><br /><p><image height="592" width="612" align="center" placement="break"<br /> href = "hello1.gif" /></p><br /><br />reflecting the constraint.<br /><br />So, yes, I'm quite sure that the graphic is distorted, and not seeing that setting to landscape (or changing the paper size at all) is helping.<br /><br />Hopefully, I'm missing something, but I'm not seeing it. I do have 8.0p277, but am not finding any updates so think I'm current.<br /><br />Bruce
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
Community Beginner ,
Jul 30, 2008 Jul 30, 2008
Bruce,

How do your read/write rules translate the attributes height and width to the corresponding Frame properties? If you are translating height to height and width to width, then note that within Frame height and width correspond to the height and width of the anchored FRAME, not the bitmapped image.

So, you might try giving your image element an impsize attribute, which is Frame's default for the import size of the bitmap. It contains both the width and the height of the bitmap. So, your image element would look like:



Note the space between the width and height. You might have to specify as impsize="738pt 592pt" (I am not sure about this last bit; in my application, I specify the size in picas, as pc, and it works fine).

Van
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
Guest
Jul 30, 2008 Jul 30, 2008
LATEST
Van,

Thanks, and I might try that, but would rather not hard-code those dimensions. Since the problem was with scaling GIFs, which don't scale nicely, the better approach seems to be to ensure that the GIFs don't transgress that 612pt limit. This involves a small change in our approach to screen captures, but is trivial. I don't like screenshots bigger than that, anyway, so it's all good.

Bruce
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