Displaying DXF LINEs

I’m having a problem displaying LINE entities from an AutoCAD DXF file. The problem is in defining a view volume that doesnt change the aspect ratio of the image. I have tried to set the view volume to the size of the image (extents coordinates from the DXF) and it didnt work. Then I tried to use the limits of the image (limmax and limmin settings of the DXF). In this way the image’s aspect doesnt change but another issue arise: When the extents are too small the image becomes a little point on the screen.

So what I need (or at least I think I need) is to compute a view volume with the same aspect ratio of the client area and the imag e being imported from the file.

If someone knows how to solve this problem or have a few tips i would appreciate.

Thanks.