I'm trying to convert some PDF files to PDF/X-1A format. I've created an action in Acrobat to do this, and I would like to call this from NodeJS whenever a new PDF file is created with my current process. Then I want to serve the converted file back to the user. There doesn't seem to be any other solutions out there to convert/compress PDFs in the way that Acrobat Pro does, so this is why I am pursuing this option.
My process is basically as follows:
genPdf:function(content,cb){
// Config for PDF generation, etc
// ...
pdfGenerator.doConversion(config, pdfPath, function(result) {
// After file is generated, I want to call my adobe action
var cmd = 'call_adobe_acrobat_action_cmd';
exec(cmd, function(error, stdout, stderr) {
// After action is called I'll initiate a watch on the directory that the action will write the converted file to
// When conversion has completed, I will serve the converted file back to the user
});
}
}