Hi all,
This is probably a stupid question, but hopefully someone can help.
Is there a way to create a page from a selected object? For example, if I select a rectangle that forms the background of my image, can I create a page of the same size and in the same location? I used to use Inkscape, and it was very simple to do that.
I had to change my paper size and now my drawing does not align with the page. The drawing is very complex and I would rather not have to move it. If there is an easy way to realign the page, please let me know.
I hope that makes sense...I'm rather new to CorelDRAW.
Jennifer said:that is exactly what I needed!
another options:
In X5, and I think as far back as 12 or X3, select the objects and then publish to PDF, choose 'selected objects' instead of document, and under prepress check bleed limit and add a margin there. You can then save it as a 'PDF preset and use it when ever you want.Would that also work for you? or do you need to enlarge the objects to a specific size minus margins?
Either way you got a working answer from John.
John
Thanks for sharing, a neat solution.Personally I use one of Os' (wOxxOm) macro, included in his TOOLS.package, for setting page size based on objects.It works perfectly (after a few 'trial and error' modifications) except for one thing; the page origin isn't reset after using the macro in X5.Do you know how to, or if it's even possible to, automatically reset the origin after 1. setting the page size with a user defined edge pad (dialog box), 2. display the page at a defined zoom level, centered?Your macro seems to move the objects, while Os' macro creates the page around the objects instead.
Hi Ronnie.
I don't exactly understand the first part of your question. The macro above does leave the page origin alone at the bottom corner.
You can change the origin by modifying the Document.DrawingOriginX (and Y) properties.
Here's an example from the help menu for it:
The DrawingOriginX property returns or specifies the horizontal drawing origin for the center of coordinates for the document relative to the center of the page. By default, the center of coordinates is set to the lower-left corner of a page.
The following VBA example moves the center of coordinates to the center of the page and creates a rectangle at this new center of coordinates. The center of coordinates is then moved back to the lower-left corner of the page, and an ellipse is created at this modified center of coordinates.
Ronny Axelsson said:2. display the page at a defined zoom level, centered?
This will zoom to all object and then zoom out. Is this what you mean?
Sub changeView() With ActiveDocument.ActiveWindow.ActiveView .ToFitAllObjects .ZoomOut End WithEnd Sub
-John
Unfortunately I don't know anything about VBA, and the things I tweaked in Os' macro were simple things, all done via experiments and some logical thinking. Anyway, I managed to copy the vital parts from the help file example in your post, and add them to the end of the macro, before 'End Sub' and now it seems to work.
Basically, when executed it brings up a dialog where you enter the desired margin to the objects (all objects) and hit OK. The unit is automatically taken from the document and the default value can be set inside the code.When the page with the desired white space has been created, it automatically zooms to a predefined zoom level (inside the code).The missing part was that the page origin didn't get reset to lower left corner. No big deal but it can sometimes be of importance, and thanks to you I have now got it to work the way I want!Thank you. Much appreciated.
This was all I needed:
Dim d As DocumentSet d = ActiveDocumentd.DrawingOriginX = -d.ActivePage.SizeWidth / 2d.DrawingOriginY = -d.ActivePage.SizeHeight / 2
Hi Ronny,
you might remember this one - I have attached a macro which needs more features, but I am happy to do that extra work after ascertaining what people would like added to it. I can only think of one thing which I will mention shortly.
The macro simply swaps the positions of 2 images/shapes. Select 2 shapes on your page and click a button. The 2 images literally swap places. In case the 2 shapes are of different sizes you can choose which part of the images will be aligned. e.g. if you click the top left button then the top left of Shape 1 will move to where the top left of shape 2 was, and vice-versa. If you click the bottom right button then the bottom right of shape 1 will move to where the bottom right of shape 2 was, and vice-versa. There are 9 buttons for all alignment options. Pressing an alignment button twice will swap the shapes and then swap them back again. The Reset button puts the 2 swapped images back to their original positions in case you forget which started out where.
The only extra feature I can think of is a mirror feature which would make, for example, the top right of shape 1 go to where the top right of shape 2 was, but the top left of shape 2 will move to where the where the top left of shape 1 was. In this example I am imagining shape 1 was originally on the left and shape 2 on the right.
Please note that if the 2 images are equal in dimensions then it makes no difference which alignment button you click on, the images will simply switch places. An example of a use for this macro might be a situation where you are going to have 5 photos in a line in your design, but you have 10 photos to choose from. You have all 10 images off the page and move 5 possible images into position. You now to want to swap out some of the images with ones off the page. You may also want to switch the positions of 2 of the 5 already on the page.
Any suggestions are welcome.
Best regards,Brian.