PDA

View Full Version : Text That Fills a Rectangle Shape in CorelDRAW x6



Tim Earling
07-21-2014, 5:08 PM
I am trying to add text to a rectangular shape box that the will automatically fill the box up from top to bottom and side to side. I am inserting names into the box -the names vary from 3 characters to 8 characters and I have a limited area to engrave (which is the size of my rectangular box - I have use a box as a boarder and currently manually fit it into the box).
I have used the envelope tool, but did not want to use the print merge feature, hope someone knows of another way.

I included a jpg to help clarify what I am trying to do.

I am working in Coreldraw x6

Real Mercier
07-22-2014, 12:43 PM
I am not at my workstation right now, but if you type your name and it is selected Corel will tell you the width and the height of the selection. Just type the dimensions you need. Make sure the little lock next to the dimension is open, just click on it if it is not (It will toggle between open and closed). If it is open it will allow you change the dimension independently. If closed, the selection will be kept proportional to the dimension you changed. You may also need to "convert to curves".

Hope that helps.
Real Mercier

Glen Monaghan
07-22-2014, 1:46 PM
I'm not aware of a truly automatic way of doing it, but you can certainly create a macro that will do it with a single click or keystroke (yeah, I know, now that I've "discovered" writing macros in CorelDraw it's like the saying about give a kid a hammer and everything starts looking like a nail...)

Tim Earling
07-22-2014, 2:59 PM
Real,
That is what I currently do. I manually adjust the size of the text. I am hoping to automatic have it stretch/shrink the text to fit a specific size box.

William Adams
07-22-2014, 4:05 PM
It'd be trivial to work up a (La)TeX macro/document class to do this, then one could open the .pdf in CorelDRAW

Glen Monaghan
07-22-2014, 11:21 PM
Sub FitToBox()
ActiveDocument.ReferencePoint = cdrCenter ' resize about center of selection
If ActiveShape Is Nothing Then Exit Sub ' bail out if nothing selected
ActiveShape.SetSize 0.71, 0.245 ' resize the selected (text) to desired width and height
End Sub

Be sure to have the text selected and run this macro (you can set a hot key for it or create a menu button to make it easier to run).

Dan Hintz
07-23-2014, 6:26 AM
I would give you a gold star if I could Glen... no idea if that code works directly, but it looks reasonable enough to tweak for his specific case if it doesn't.

Glen Monaghan
07-23-2014, 11:26 AM
ooooo gold staaaaaar!! (Back when I taught computer engineering at the USAF Academy, I used my then-young daughter's rubber stamp collection on graded labs and exams; you would be surprised how much more willing the students were to make a little extra effort to earn unicorn or frog stamps than run-of-the-mill numerical or letter grades!)

Of course it works, would you post code without trying it first? ;^)