Cropping pages with Acrobat 5.0

Hi,

I’ve been using a script to crop PDF’s with Acrobat 5.0 and it’s worked perfectly for quite some time now. The only problem that I have is that I need the end result to be a PDF compatible with Acrobat 4.0. When I crop using Acrobat 5.0, it saves the PDF to be compatible only with 5.0. I tried changing the script to use Acrobat 4.0 to crop (I even changed the command line to “set bounds of PDPage 1 of…”), but it won’t seem to do the same thing. I think it might be because I’m negatively cropping my pages (creating more white space around the sides and top), and maybe only Acrobat 5.0 can crop like that? For now, I have to save the cropped PDF as a PostScript and distill it for it to be 4.0 compatible. This is obviously more time consuming than I want it to be (since I usually deal with a large number of PDF’s). Does anyone know if I can change the compatibility of the PDF, or at least have applescript save the cropped PDF as a PostScript into a watched folder for Distiller? Your help would be most appreciated!

Here’s my code:

on adding folder items to this_folder after receiving added_items
	set dtFolder to (path to desktop as string)
	set inProgress to (dtFolder & "Cropping:")
	set doneFolder to (dtFolder & "Class Crop - Done:")
	
	tell application "Finder"
		if not (exists folder inProgress) then
			make new folder at folder dtFolder with properties {name:"Cropping"}
		end if
		if not (exists folder doneFolder) then
			make new folder at folder dtFolder with properties {name:"Class Crop - Done"}
		end if
	end tell
	
	repeat with thisFile in added_items
			tell application "Finder"
				set fileName to name of thisFile
				move thisFile to folder (inProgress)
			end tell
			tell application "Acrobat™ 5.0"
				open (inProgress & fileName)
				set bounds of «class page» 1 of document fileName to {927, 1667, -81, 20}
				close fileName saving yes
			end tell
			tell application "Finder"
				move file (inProgress & fileName) to folder (doneFolder)
			end tell
	end repeat
end adding folder items to

How about if you tell acrobat 4 to open and resave the version 5 document? I know that works going from 6 to 5. The first time you do it you are prompted with a dialog telling you that it’s a newer file that you will have to check and hit ok. Otherwise if you are SURE that there are no PDF1.4 commands you can actually change the line in the PDF directly to make it think it’s actually a PDF1.3 document.

HTH -john

Thanks for your reply!

I don’t think that I would be able to change the line in the PDF, since when I open the file in Acrobat 4.0, there’s only whitespace…the images and text aren’t there. I thought that the idea of having Acrobat 4.0 re-save it would work, but it will save the file as just a bunch of whitespace. I think I have to make Acrobat 5.0 save the PDF as a PostScript (or an EPS) into a watched folder for distiller to turn it into 4.0 (since that’s what I’m currently doing, and it works properly). I can’t figure out the command to do that, though. Does anybody know if that’s possible? Thanks!