I am recieving PNG files, I want to import them into photoshop, change profile to CMYK, then save as a tiff, then I want to import the tiff into Indesign file, positioned and create a Hi Res print ready PDF, can you help doing this for me?
-
2Please read [this](https://stackoverflow.com/help/how-to-ask) then come back and [edit your question](https://stackoverflow.com/posts/54348250/edit) to let us know what you have tried so far and where the problem is exactly – cybernetic.nomad Jan 25 '19 at 03:31
1 Answers
If you want to automate the process then you have two options Actions or Scripting. Creating actions is much easier since you just record a macro of each step like changing the colour mode from RGB to CMYK. However, since this you've asked your question on StackOverflow I'm assuming you want to do this via code.
You can use JavaScript, AppleScript or Visual Basic to script in Photoshop. JavaScript is universal and quite well documented.
This script will convert the file to CMYK and then save it out as a TIFF, so that's half your job done. However, you make it very difficult regarding the indesign part as you state the images need to be "positioned", but don't include any specifics or co-ordinates. Also, I don't have your files in front of me. I might as well be wearing a blindfold. The more details you can add as part of your question the clearer it is for others to help you.
I'll walk you through the code line by line. I hope this helps.
// Call the source document
// it makes it easier than typing app.activeDocument all the time
var srcDoc = app.activeDocument;
// Get the name of the current document
var fileName = app.activeDocument.name;
// Call the function getFileName to remove the extension
var docName = getFileName(fileName);
// Set filePath and fileName to source path
var filePath = srcDoc.path + "/" + docName + ".tiff";
// Change the mode to CMKY
app.activeDocument.changeMode(ChangeMode.CMYK)
// Flatten the tiff
srcDoc.flatten();
// tiff file options
var tiffFile = new File(filePath);
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.byteOrder = ByteOrder.MACOS;
tiffSaveOptions.layers = false;
tiffSaveOptions.transparency = true;
tiffSaveOptions.alphaChannels = true;
tiffSaveOptions.embedColorProfile = false;
tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
tiffSaveOptions.saveImagePyramid = false;
// save the file out!
activeDocument.saveAs(tiffFile, tiffSaveOptions, false, Extension.LOWERCASE);
// get file name function
function getFileName(afilename)
{
return afilename.substring(0, afilename.lastIndexOf("."))
}

- 6,249
- 10
- 67
- 125
-
Hi, Thanks for that, it looks like thats just what I am trying to do. With regard to the positioning of the file in Indesign, I want it in at -3 and -3, so that it bleeds. – Adam Curley Jan 26 '19 at 17:41