All work prefectly, I have been made it as You told outside Core and pass it to Save location.
Only have to solve how to delete ".pdf" from filename of saved EPS and erverything will work as I wanted.
Thanks a lot again. You saved me a week of time each year :)
My happiness did not last long, after further testing, it turns out that the saved EPS file does not keep information about the layers.
I have to have a EPS just like Adobe Acrobat "Save as" to EPS do.
I found something like this:
Try flattening the PDF before trying to export to EPS using one of the methods earlier described - Ghostscript, Xpdf or printing to EPS from Acrobat.
Here is another way saving to EPS from Acrobat Pro DC using Python. The attached script is based on this:
but modfied to save to EPS and to be used in an External Process node in FreeFlow Core.
Create a workflow with a Save node that saves to C:\Out using $FFwfJob.jobName$
Place an External Process node after the Save node. Use save_as_eps_from_acrobat_pro_dc.py.bat as script using the parameters: "$FFin$" "$FFout$" "$FFwfJob.jobName$"
The Python script will then use sys.argv which is the "$FFwfJob.jobName$" and create an EPS using com.adobe.acrobat.eps and save that EPS to C:\Out.
Im doing something wrong, there is an error "Job 1 is in the aborted state". It is stuck on External Node, I found "The system cannot find the path specified" in stderr.log
when trying to execute script manualy I have this:
PS C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts> python save_as_eps_from_acrobat_pro_dc.py
Traceback (most recent call last):
File "save_as_eps_from_acrobat_pro_dc.py", line 3, in <module>
ModuleNotFoundError: No module named 'winerror'
Im trying to install it by "pip install winerror" but it says that there is no version
OK, now when i try:
PS C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts> python save_as_eps_from_acrobat_pro_dc.py "C:\in\testCIECIE.pdf" "C:\Out" "testCIECIE"
Acrobat it opening and it says "file not found"
Am I giving paramterers correctly?
edit I have Adobe Acrobat 2017, meaby this is an issue?
I have Acrobat Pro DC 2020. Try running it oustide FFCore first just with Python only and without a batch file. I run it like this, where I have a test pdf C:\Out\test.pdf and the result I get after running this with Python is an EPS C:\Out\test.eps
from win32com.client.dynamic import Dispatch, ERRORS_BAD_CONTEXT
my_dir = r"C:\Out"
#my_pdf = sys.argv + ".pdf"
my_pdf = "test.pdf"
AvDoc = Dispatch("AcroExch.AVDoc")
if AvDoc.Open(src, ""):
pdDoc = AvDoc.GetPDDoc()
jsObject = pdDoc.GetJSObject()
#jsObject.SaveAs(os.path.join(my_dir, sys.argv + ".eps"), "com.adobe.acrobat.eps")
jsObject.SaveAs(os.path.join(my_dir, "test.eps"), "com.adobe.acrobat.eps")
except Exception as e:
jsObject = None
pdDoc = None
AvDoc = None