Images In Word (Advanced Questions)

W

Wayne Herbert

I have a document which uses a watermark. The watermark is actually a
template over which text is written (creates nice looking columns).
The Word document is then processed with Adobe Professional to create
a .pdf file which goes to the printer for publicaiton. It mainly
works well but I have a few problems with the resolution of the
watermark image when it ends up in a .pdf file.

A watermark is an image loaded into the header as in (code is object
pascal):

// get the header we want to which we add the watermark
Word.ActiveDocument.Sections.Item(1).Headers.Item(HeaderToUse).Range.Select;
OleVar := false;
OleVar2 := true;
// create the shape from a file - saved with doc
Word.Selection.HeaderFooter.Shapes.AddPicture(Filename, OleVar,
OleVar2, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
EmptyParam);

The first oddity is that I have created the watermark image to be
exactly the size I need when I load it into the document, and yet, it
is automatically resized to something less than 100 percent (perhaps
due to margins???). This forces me to issue the following code to
place the water mark in the right place and set its scale back to 100
percent.

// size the image and setup to insure text writes over the picture
OleVar := Word.Selection.HeaderFooter.Shapes.Count;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Name := WorkingDesc;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).PictureFormat.Brightness
:= 0.5;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).PictureFormat.Contrast
:= 0.5;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).LockAspectRatio :=
vbTrue;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Height :=
WaterMarkHeight;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Width :=
WaterMarkWidth;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).WrapFormat.Side :=
wdWrapNone;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).WrapFormat.Type_ :=
wdWrapNone;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).RelativeHorizontalPosition
:=
wdRelativeHorizontalPositionMargin;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).RelativeVerticalPosition
:=
wdRelativeVerticalPositionPage;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Left :=
WaterMarkLeft;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Top := WaterMarkTop;

I should note that the 'WaterMarkLeft' reference above is a negative
number relative to the left margin.

Now for the questions:

a) since the image has been resized (apparently) and then changed back
again by me, has the image in the Printview of the document been
degraded as a result of the resizing?

b) is there any advantage in terms of maintaining desired resolution
(600 DPI) and file type (TIF) by keeping the image file stored outside
the document?

c) What can I do to insure that my image stays at 100 percent when
loaded by word so that Adobe can process the image at its original
resolution?

d) Can I control the format of the image in Word, or to put it another
way, if I specify a monochrome TIF, will Word respect that or attempt
to convert it to something it is familiar with.

Thank you.

Wayne Herbert
 
W

Wayne Herbert

Bump

I have a document which uses a watermark. The watermark is actually a
template over which text is written (creates nice looking columns).
The Word document is then processed with Adobe Professional to create
a .pdf file which goes to the printer for publicaiton. It mainly
works well but I have a few problems with the resolution of the
watermark image when it ends up in a .pdf file.

A watermark is an image loaded into the header as in (code is object
pascal):

// get the header we want to which we add the watermark
Word.ActiveDocument.Sections.Item(1).Headers.Item(HeaderToUse).Range.Select;
OleVar := false;
OleVar2 := true;
// create the shape from a file - saved with doc
Word.Selection.HeaderFooter.Shapes.AddPicture(Filename, OleVar,
OleVar2, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
EmptyParam);

The first oddity is that I have created the watermark image to be
exactly the size I need when I load it into the document, and yet, it
is automatically resized to something less than 100 percent (perhaps
due to margins???). This forces me to issue the following code to
place the water mark in the right place and set its scale back to 100
percent.

// size the image and setup to insure text writes over the picture
OleVar := Word.Selection.HeaderFooter.Shapes.Count;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Name := WorkingDesc;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).PictureFormat.Brightness
:= 0.5;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).PictureFormat.Contrast
:= 0.5;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).LockAspectRatio :=
vbTrue;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Height :=
WaterMarkHeight;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Width :=
WaterMarkWidth;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).WrapFormat.Side :=
wdWrapNone;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).WrapFormat.Type_ :=
wdWrapNone;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).RelativeHorizontalPosition
:=
wdRelativeHorizontalPositionMargin;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).RelativeVerticalPosition
:=
wdRelativeVerticalPositionPage;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Left :=
WaterMarkLeft;
Word.Selection.HeaderFooter.Shapes.Item(OleVar).Top := WaterMarkTop;

I should note that the 'WaterMarkLeft' reference above is a negative
number relative to the left margin.

Now for the questions:

a) since the image has been resized (apparently) and then changed back
again by me, has the image in the Printview of the document been
degraded as a result of the resizing?

b) is there any advantage in terms of maintaining desired resolution
(600 DPI) and file type (TIF) by keeping the image file stored outside
the document?

c) What can I do to insure that my image stays at 100 percent when
loaded by word so that Adobe can process the image at its original
resolution?

d) Can I control the format of the image in Word, or to put it another
way, if I specify a monochrome TIF, will Word respect that or attempt
to convert it to something it is familiar with.

Thank you.

Wayne Herbert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top