Hello,
I use the imposition layout tool all the time and find it very useful to create a single page PDF from multiple pages in a CorelDRAW file. I have ran into a little problem where I need the exact opposite of this tool. I have a CDR that contains 9 images per page, all perfectly symmetrical to each other. It's actually a card game layout, 9 cards per page, 3 rows and 3 columns. Each card measures 2.5in x 3.5in. All combined the page is 7.5in x 10.5in.
What I want to do is print to PDF or export as PDF, but just one card per page. The final product would be a multi-page PDF file where the page size is 2.5in x 3.5in and there would be one card per page. Is this possible somehow using CorelDRAW?
sonnaps said:I have hundreds of pages, with 9 cards per page.
If each page has nine cards in exactly the same locations, then it might be possible to write a VBA macro to copy one card, create a new page of the desired size, paste the card on that page, etc. For each page in the original document, nine new pages would be created, with one card on each.
Are you using the regular version of CorelDRAW? Or the Home & Student version?
sonnaps said:That sounds interesting, I have never tried any VBA macros. I have the regular version.
If you would be willing to send me a file, then I am willing to try it. Contact me by private message if you wish.
For what I have in mind, I don't think the VBA part of it would be very difficult to write. I don't know if CorelDRAW will have any trouble with a large number of pages, but I could only find that out by trying.
1 page with 9 individually grouped cards. Select the nine and run the macro.
If you have 100 pages with 9 cards each you'll end up with 900 pages. Might be best to copy the first nine to a new doc then run the macro.
Sub ShapesAsPages2()
ActiveDocument.BeginCommandGroup "ShapesAsPages2"
Dim s As Shape, sDuplicate As Shape, w#, h#
Dim sr As ShapeRange
Dim PageNext As Page
Set sr = ActiveSelectionRange
For Each s In sr.Shapes
s.GetSize w, h
Set PageNext = ActiveDocument.InsertPages(1, False, ActivePage.Index)
ActivePage.SizeHeight = s.SizeHeight
ActivePage.SizeWidth = s.SizeWidth
s.MoveToLayer PageNext.Layers(s.Layer.Name)
s.AddToSelection
ActiveSelection.AlignAndDistribute cdrAlignDistributeHAlignCenter, cdrAlignDistributeVAlignCenter, cdrAlignShapesToCenterOfPage
DoEvents
Next s
ActiveDocument.Pages.First.Delete
ActiveDocument.EndCommandGroup
End Sub
Eskimo said: If you would be willing to send me a file, then I am willing to try it. Contact me by private message if you wish. For what I have in mind, I don't think the VBA part of it would be very difficult to write. I don't know if CorelDRAW will have any trouble with a large number of pages, but I could only find that out by trying.
As an exercise, I wrote something to do this. it doesn't depend on each card already being a single group, but selects shapes contained in each rectangular area where a card is expected to be (as if one had "marquee selected" the shapes for each card).
Starting with this:
produces nine pages laid out like these:
(The dimensions weren't part of the original pages I was working with; I added them later just to show the sizes here.)
The way it is now, my code processes multiple original 9-card pages in one operation (e.g., 50 pages become 450 pages).
If you supply a file, I'll try processing it.