cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

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 :)

0 Kudos
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

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:

https://www.pdfscripting.com/public/How-to-Save-a-PDF-2.cfm#DiffFormat

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Save/Export to EPS

Jump to solution

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.

0 Kudos
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

I think I tried it. Im waiting for response from Summa.

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Save/Export to EPS

Jump to solution

Here is another way saving to EPS from Acrobat Pro DC using Python. The attached script is based on this:

https://stackoverflow.com/questions/51530305/adobe-acrobat-api-in-python

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[3] which is the "$FFwfJob.jobName$" and create an EPS using com.adobe.acrobat.eps and save that EPS to C:\Out.

Stefan

 

0 Kudos
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

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 

 

edit:

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>
import winerror
ModuleNotFoundError: No module named 'winerror'

Im trying to install it by "pip install winerror" but it says that there is no version

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Save/Export to EPS

Jump to solution

Try:

pip install pywin32

0 Kudos
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

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?

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Save/Export to EPS

Jump to solution

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

import os
import sys   
import winerror
from win32com.client.dynamic import Dispatch, ERRORS_BAD_CONTEXT

ERRORS_BAD_CONTEXT.append(winerror.E_NOTIMPL)

my_dir = r"C:\Out"
#my_pdf = sys.argv[3] + ".pdf"
my_pdf = "test.pdf"

os.chdir(my_dir)
src=os.path.abspath(my_pdf)

try:
    AvDoc = Dispatch("AcroExch.AVDoc")   

    if AvDoc.Open(src, ""):           
        pdDoc = AvDoc.GetPDDoc()
        jsObject = pdDoc.GetJSObject()
        #jsObject.SaveAs(os.path.join(my_dir, sys.argv[3] + ".eps"), "com.adobe.acrobat.eps")
        jsObject.SaveAs(os.path.join(my_dir, "test.eps"), "com.adobe.acrobat.eps")

except Exception as e:
    print(str(e))

finally:       
    AvDoc.Close(True)

    jsObject = None
    pdDoc = None
    AvDoc = None

0 Kudos
Highlighted
Frequent Member
Frequent Member

Re: Save/Export to EPS

Jump to solution

OK, this "manual" script works, how to make it works with Core?

0 Kudos