LO Writer DWG in .doc

I have a lot of .doc files with DWG’s inserted (just like that).
When I open them with Writer it shows inserted DWG’s as low resolution bitmaps. Same problem when printing or exporting them to PDF.
Is there any way to show DWG’s as vector? Or at least to increase the resolution?

Win 10 x64, LO 7.1 x64. Tried several different versions - same issue. See the .doc file attached: DWG.doc
I have copied this object from LO Writer to LO Draw. In Draw it looks much better. Smooth but with a bit wrong aspect ratio:

It would be nice if Writer could open it the way Draw does.
Thanks a lot.

It looks like there is a plugin in Word to manage the DWG drawings. Edit you question to attach a short sample file with only one small simple DWG so that we can see what is in the file. Use the paperclip tool when editing.

As usual, mention your OS name and LO version. Note also that .doc files are first converted to LO internal format which could cause loss of information.

You can try to copy and paste this object from LO Writer or MS Word to LO Draw. And it will look ok. It even prints and exports to PDF ok. But exporting to PNG/GIF/SVG looks like lores bitmap.
I mean, may be there is a way to make LO Writer work with this object like LO Draw does?

From @Astur’s HTML snippet, it looks like the object is already a bitmap (perhaps png which is a bitmap format anyway). Draw is a graphics application which will get the image and display it at 1:1 pixel scale. Even if Draw exports it as .svg, it can’t recreate the vector primitives and saves it as an embedded bitmap with appropriate scaling parameters so that other application can display it without artefacts.

Writer is a document processing application. Images are inserted into frames which are resized according to text constraints (margins, wrap mode, other objects, …). It is therefore likely that the bitmap is scaled, resulting in poor rendering. Try various combinations of frame size and picture scaling to see if you can improve display.

Note that you can’t get a better display than the original bitmap (because this is not a vector format).

When you double click this object in LO Writer, LO Draw or MS Word it opens %USERPROFILE%\AppData\Local\Temp\A$C(RANDOMSYMBOLS).DWG file. On my PC it opens Autodesk DWG TrueVIew and shows this drawing in it. And it is definitely the vector drawing.

Then there is more than what is shown in the HTML snippet. .dwg is definitely a CAD file but, as already mentioned, LO can’t manage it. Import filters are provided for .dxf but not for .dwg. Consequently, Writer (and LO in general) uses the embedded bitmap image.

If double-clicking opens a file, the file itself is not embedded in the Writer document. It is an OLE link to the real file.

I have just copied the .doc attached in the first message to the clean PC with Office and Autodesk DWG TrueView. Opened it, double-clicked the object. And it opened the DWG drawing. So I think it is embedded in the .doc file.

This looks like a bug (improper scaling and low-resolution rendering of the preview image of an OLE object). Please file it.

A funny thing is, if I save the document in Word 2016 to ODT, and then reopen it again in Word, the result is identical to what Writer shows opening the .DOC :slight_smile:

Bug 141911
Thank you.

@Astur: how’s that?

FTR: the problem here is not the DWG itself, that indeed is embedded into the document. The problem is its preview image, which is an MTF (also a vector image), which is shown in both Word and Writer; but Writer scales it wrongly, and uses a low-resolution rendering for it.

@Astur: therefore it’s a comment telling that the object inside the document is indeed a vector drawing, and thus the expectations of OP to see a hi-res image in the text document are justified (in response to your earlier comment telling that the object there is a raster PNG preview, and later comment by @ajlittoz with further thoughts about that). In no way it’s any kind of an answer to @libre_K’s original question.

Was it not what he asked:

Is there any way to show DWG’s as vector? Or at least to increase the resolution?

You are playing with words, picking them out of context. OP asked about LO Writer DWG in .doc; the question mentioned the method to insert the objects into Word that they used for creation of the document - hence OP has the original DWG, and is able to open them outside of Writer; the question mentioned “printing and exporting to PDF”, which is very different in AutoCAD (and TrueView) vs Writer, and the page setup in Writer does not directly translate to DWG settings; finally, the destination system may be unable to even install TrueView (some Linux or embedded system). It’s obvious that OP asks about improving how Writer works, not about how to open its object outside. Please do not play such word games.

For any user, it’s reasonable to expect display in LibreOffice at least not worse than in alternatives. This expectation may be wrong in some cases; but by default, it is a valid expectation. Then it is reasonable for a user to ask if this expectation is broken. This is what happened here. And since this expectation turned out to be valid (there is a vector graphic preview in a format that Writer understands (Windows Metafile), and it’s only some bug that results if this poor view), a bug report was rightfully created.

A workaround is nice when it’s wanted, which is not what was asked here.

If you have the source file of the images (and a DWG editor/converter/viewer software), then you can try to insert them in the supported DXF vectorgraphic format into your documents:

The .dwg file types have many subversions, and - maybe - the licence of the .dwg file format is not free.
From the WIKI:


"From 1982 to 2009, Autodesk created versions of AutoCAD which wrote no fewer than 18 major variants of the DWG file format,[7] none of which is publicly documented. "

Free DWG

Here is some information, how the developers of the free softwares tried to create and apply a free version of the DWG file type.


However, the DXF fileformat is documented, therefore the LO developers was able to apply it.