Text Stretching when Pasting from pdf or opening a cgm

Good Day,

This is my first time using the community so here goes! I have an issue with CorelDraw X8 when I try to paste from a pdf or open a cgm file some (not all) of the text will be stretched out horizontally to a point it is unreadable.

Thank you!

Parents Reply
  • Flyingfish23 said:

    (Please visit the site to view this file)

    Hi Eskimo, here is the file

    When I open your file in CorelDraw, I see that some of the text is stretched horizontally to less than 100% (by just a little bit) and some of it is stretched horizontally to >100% (by a lot).

    If I select everything and use "Clear Transformations", then I get this:

    I have a macro that allows me to apply "Clear Transformations" to shapes while retaining specified alignment for each shape. If I go back to your file as received, then use that macro, specifying that the left X, bottom Y position of each shape be retained, I get this:

    Here's the macro code:

    Sub clear_trans_keep_LeftXBottomY()
    Dim sr As ShapeRange
    Dim s As Shape
    Dim LeftX_original As Double
    Dim BottomY_original As Double

        Optimization = True
        ActiveDocument.BeginCommandGroup "Clear Trans keep LeftX BotY"
        EventsEnabled = False
        On Error GoTo ErrHandler
        
        Set sr = ActiveSelectionRange
        If sr.Count = 0 Then
            MsgBox "Nothing is selected.", vbExclamation
        Else
            For Each s In sr
                LeftX_original = s.LeftX
                BottomY_original = s.BottomY
                s.ClearTransformations
                s.LeftX = LeftX_original
                s.BottomY = BottomY_original
            Next s
        End If
        
    ExitSub:
        Optimization = False
        EventsEnabled = True
        Application.Refresh
        ActiveDocument.EndCommandGroup
        Exit Sub

    ErrHandler:
        MsgBox "Error occurred: " & Err.Description
        Resume ExitSub
    End Sub

    Select everything, then run the macro.

    Of course, it would be better to have the content come in correctly in the first place. If that's not to be had, then something like this macro might help to fix things up after the fact.

Children