Hello,
I got a problem with a macros which have to resize imported images, crop them to specific size and ordering them 3x3 per page. Can you help me with the code?
For the moment I succeeded to make this:
Sub Macro1() '15 sm = 5.905512 '13 sm = 5.11811 '10 sm = 3.937008 '9 sm = 3.543307 NumberImages = 2 DimensionX = 5.905512 DimensionY = 3.937008 ActiveDocument.ReferencePoint = cdrCenter For i = 1 To NumberImages If ActiveLayer.Shapes(i).SizeWidth > ActiveLayer.Shapes(i).SizeHeight Then ActiveLayer.Shapes(25).Rotate 90# ActiveLayer.Shapes(i).SetSize 0, DimensionY If ActiveLayer.Shapes(i).SizeWidth < DimensionX Then ActiveLayer.Shapes(i).SetSize DimensionX, 0 End If Next End Sub
But cropping each image to the dimensions don't want to work. Any help with arranging 3x3 per page and centering them on each page A3 will be great.
From your code I understand you are working with 2 sizes of images (probably photos)
1. 9x13 cm - 3 images imported, resized and imposed 3x3 on A3 (42x29.7 cm)
2. 10x15 cm - 2 images imported, resized and imposed 2x2 on A3 (42x29.7 cm)
I have included another size to my code - 13x18 cm - 2 images imported, resized and imposed 2x2 on A3 (42x29.7 cm)
Attached code is also creating rectangle around the group of ordered pictures with bleed 3 mm.
Best regards,
Mek
ResizeAndOrdering.gms
Mek, thank you for the reply. Generally its working, but I suppose I have to explain a little bit more the task. I had to order 1200 photos (all made with different cameras, have different sizes, different proportions) to print them. Part of them I have to make them 90x130 mm (other part 100x150 mm) ordered 3x3 on a sheet with size 487x330 mm. Because of this I have to import for example 198 images in the coreldraw file, to resize them to 90x130 mm (if the proportion is 90x135, I have to crop or powerclip the image to 90x130 mm). Then I have to center the group of 9 ordered already images, to center them on the page with the right orientation, and continue ordering every 9 images on different page. An option to change resolution of images to 150,200,300 DPI will be great. For me the big problem was to crop or powerclip the image to specific size, to order them and center the group of 9 images. When I try to crop an image, the rest of them disappear from the workspace. Thank you again spending your time to help me. Best regards, Filip
Filipe,
Thanks for detail information.
1. Creating file with photos from various sources
I would convert photos to one PDF (it can be done by Adobe Acrobat – Create PDF file from more files or PDF Architect etc)
2. Open PDF file in Corel Draw
3. Run attached macro
a. Select required resolution
b. Select required photo size (9x13 cm or 15x10 cm) – photo on each page resized, resampled and power clipped
c. publish cdr document to PDF file (all photos have same page size and resolution) – pdf saved on same folder as cdr file
4. Open PDF file with photos on Adobe Reader – Print – select printer – change paper size to SRA3 (488x330 mm) and select Option Print more pages of PDF on one sheet – number of pages to sheet – own 3x3
Hope this helps.
Best regards
Resize.gms
Hi Mek, The script does not work well. It change proportions of the photos and make them 1 photo per page 90x130 mm. Also publishing to PDF gives error "Object doesn't support property or method438" , but its not important. Publishing to PDF is not something I need to automate.
I'll see the code whether I can make the change myself. At least it gives me idea how to powerclip the images. :) Thanks for the hints :) Filip