Ai file loses color profile after processing.
-
- Member
- Posts: 62
- Joined: Fri Jun 12, 2020 11:23 am
Ai file loses color profile after processing.
I have an illustrator element which makes PDFs from ai files. After this process the ai file loses it's color profile. what can cause this?
In the element i use a script for the Command part, and Illustrator in the Save as option.
In the element i use a script for the Command part, and Illustrator in the Save as option.
Re: Ai file loses color profile after processing.
There is an Illustrator save option that determines whether or not the ICC profile should be included and the default is "false". That probably explains why saving as Illustrator loses it.
This being said, you should not save the PDF with a script for the Command property, but just with the standard "Save as" functionality to save it as PDF. If you also want to keep the Illustrator file and continue with it in the flow, then simply send the AI file both to the configurator and to another folder that continues in the flow.
This being said, you should not save the PDF with a script for the Command property, but just with the standard "Save as" functionality to save it as PDF. If you also want to keep the Illustrator file and continue with it in the flow, then simply send the AI file both to the configurator and to another folder that continues in the flow.
-
- Member
- Posts: 62
- Joined: Fri Jun 12, 2020 11:23 am
Re: Ai file loses color profile after processing.
We cannot use Save as to make PDFs because of our printing software's settings. I can use my PDF making script in the Save as option of the Illustrator element. But doing it this way i get no output from the element which i need to measure the time spent on making PDFs.freddyp wrote: ↑Tue Jan 19, 2021 5:08 pmThere is an Illustrator save option that determines whether or not the ICC profile should be included and the default is "false". That probably explains why saving as Illustrator loses it.
This being said, you should not save the PDF with a script for the Command property, but just with the standard "Save as" functionality to save it as PDF. If you also want to keep the Illustrator file and continue with it in the flow, then simply send the AI file both to the configurator and to another folder that continues in the flow.
There is an option to get only a log as the output from the Illustrator element. Is it possible to create this log with a script? What are the requirements for this log file format?
//Edit: found a somewhat solution. Since after the pdf making i only need the illustrator file for it's metadata, i save it as a pdf in the element with the smallest size. from there i can extract the metadata to my following processes.
Re: Ai file loses color profile after processing.
I do not understand that one. Are you referring to a specific custom PDF preset you have to use? In that case add it to the AI on Switch and choose it from the list.We cannot use Save as to make PDFs because of our printing software's settings
You can of course add your script to the "Save as" property. That is certainly more logical than adding it to "Command". From your script you cannot control the Log output of the element. If you want to create your own log file with a timing on how long the script ran, how many images there are in the file, what the document's ICC profile is, etc. I suggest you save the PDF and your own log file in $outfolder, add the paths to the array $outfiles and set $jobfolder to the name you want for the job folder in Switch. Once you have the job folder in Switch you could do an XML pickup (if your log file is an XML) or you could dismantle it.
Read more here: https://www.enfocus.com/manuals/UserGui ... tions.html
-
- Member
- Posts: 62
- Joined: Fri Jun 12, 2020 11:23 am
Re: Ai file loses color profile after processing.
We are using Adobe PDF printer to make pdfs from the ai file. This requires some extra steps to get the PDFs with metadata, but it's manageable. I just need the illustrator element to not save the file at all, because on some occasions the file is very big and it takes a lot of time. But i also need the file to move through the element so that i can measure the time spent on making PDFs. Saving the ai as a pdf with the smallest file size preset seems to be the best solution at the moment. I will try, if we can make the illustrator element close the file without saving with a script.freddyp wrote: ↑Wed Jan 20, 2021 9:12 amI do not understand that one. Are you referring to a specific custom PDF preset you have to use? In that case add it to the AI on Switch and choose it from the list.We cannot use Save as to make PDFs because of our printing software's settings
You can of course add your script to the "Save as" property. That is certainly more logical than adding it to "Command". From your script you cannot control the Log output of the element. If you want to create your own log file with a timing on how long the script ran, how many images there are in the file, what the document's ICC profile is, etc. I suggest you save the PDF and your own log file in $outfolder, add the paths to the array $outfiles and set $jobfolder to the name you want for the job folder in Switch. Once you have the job folder in Switch you could do an XML pickup (if your log file is an XML) or you could dismantle it.
Read more here: https://www.enfocus.com/manuals/UserGui ... tions.html
Re: Ai file loses color profile after processing.
Code: Select all
$doc.close( SaveOptions.DONOTSAVECHANGES );
-
- Newbie
- Posts: 17
- Joined: Thu May 03, 2018 6:07 pm
Re: Ai file loses color profile after processing.
freddyp wrote: ↑Mon Jan 25, 2021 1:59 pmHI,Code: Select all
$doc.close( SaveOptions.DONOTSAVECHANGES );
I have the same need
I used "$doc.close(SaveOption.DONOTSAVECHANGES)" in the "Save as" script but does not work.
this is my script:
the error returned is:Code: Select all
var $outfiles= []; var $jobfolder = $arg1 try { $doc.close(SaveOptions.DONOTSAVECHANGES) $outfiles.push($outfolder + '/' + $doc); } catch(theError) { $doc.close(SaveOptions.DONOTSAVECHANGES); $error = theError.description; }
what am I doing wrong?C:\ProgramData\Enfocus\Switch\13.1\scripted-plugins\com.enfocus.AdobeIllustrator\Illustrator_SaveAsPDF.vbs(42, 26) Adobe Illustrator: Error 45: Object is invalid. Line: 280 -> $doc.close(SaveOptions.DONOTSAVECHANGES)
Re: Ai file loses color profile after processing.
It is the SaveOptions variable that is not defined. Add the line:
Code: Select all
var SaveOptions = new IllustratorSaveOptions();
-
- Newbie
- Posts: 17
- Joined: Thu May 03, 2018 6:07 pm
Re: Ai file loses color profile after processing.
Does not work... the same error return..freddyp wrote: ↑Thu Feb 25, 2021 8:43 amIt is the SaveOptions variable that is not defined. Add the line:Code: Select all
var SaveOptions = new IllustratorSaveOptions();
