Skip to main content
1-Visitor
January 16, 2012
Question

Print Composer Batch Mode

  • January 16, 2012
  • 7 replies
  • 2393 views

Adepters,


I am trying to create a pdf file using Print Composer in batch mode. After looking through some older threads I was able to use:



Method 1:


epic.exe -c "print" test.sgm (this results in a pdf output but prompts the user for the filename)



Method 2:


epic.exe -c "print printer='Adobe PDF' file=test.ps" test.sgm (this suppresses the filename prompt, but outputs postcript)



Is there a way to use the second method (suppressing user input) but output directly to pdf (bypassing the need to use distiller)?



Thanks in advance!

    7 replies

    1-Visitor
    January 16, 2012
    This is a bug in Arbortext 6.0 but it is supposed to be fixed in M030. I haven’t tried it yet.

    If you don’t want or aren’t ready for M030, you can do the following:

    Comp_print.acl changes:
    This file is located in C:\Program Files\PTC\Arbortext Editor\packages\tools

    At approx line 42 in this file, insert the following:
    #line 43 below was inserted. It was omitted by PTC. Without it line 951 fails.
    autoload audience::create_logical_string() audience;

    Line 951 (approx.) reads as follows:
    params[ "prof.logicalExpression" ] = audience::create_logical_string( profileArr, doc );

    When running Arbortext Editor in batch mode for producing PDF, this line causes an error because “audience” is an unknown package. The forward declaration back up at line @42 declares this package/function so that line @951 will work.

    You can put a modified copy of comp_print.acl in your doctype Custom\scripts folder if you have one. You can create a custom\scripts folder to avoid messing with Arbortext’s core ACL files..

    1-Visitor
    January 18, 2012
    Hello,

    If you parameter the 'Adobe PDF' printer in order to produce pdf files in c:\temp (or the directory of the TEMP environment variable,
    you can call a DOS batch file containing this (with the sgm or xml file as first parameter) :
    1-Visitor
    January 18, 2012
    REM The next line from the word "start" to the word "exit" must be on one line.
    start /B /wait " "C:\Program Files\Arbortext\Editor5.3\bin\epic.exe" -C2 "set printfosi='schematics.fos';gsub('\\','/','%CD%',$p);_pubpdf::publish_pdf_file(current_doc(),$p.'/'.basename(doc_path($doc_id),'.sgm').'.pdf'); exit" SD-28-003.sgm

    start /B /wait " "C:\Program Files\Arbortext\Editor5.3\bin\epic.exe" -C2 "set printfosi='schematics.fos';gsub('\\','/','%CD%',$p);_pubpdf::publish_pdf_file(current_doc(),$p.'/'.basename(doc_path($doc_id),'.sgm').'.pdf'); exit" SD-31-002.sgm

    start /B /wait " "C:\Program Files\Arbortext\Editor5.3\bin\epic.exe" -C2 "set printfosi='schematics.fos';gsub('\\','/','%CD%',$p);_pubpdf::publish_pdf_file(current_doc(),$p.'/'.basename(doc_path($doc_id),'.sgm').'.pdf'); exit" SD-94-004.sgm exit



    \ / Andy Esslinger LM Aero – Tech Order Data
    _____-/\-_____ (817) 279-0442 1 Lockheed Blvd, MZ 4285
    \_\/_/ (817) 777 3047 Fort Worth, TX 76108-3916

    1-Visitor
    August 17, 2012

    I am trying to use batch mode to compose XML files using XSL-FO style sheets on PE.


    Here is the line I have tried but nothing happens.


    C:\ArbortextPE\bin\editor.exe -E3w -newinstance -c "print composed allpasses force printer='Adobe PDF' file=R00001.pdf stylesheet='e3:xslfo-main-v1_9.xsl" R00001.xml


    C:\ArbortextPE\bin\editor.exe E3w -newinstance -c "print composed allpasses force printer='Adobe PDF' file=R00001.ps stylesheet='e3:xslfo-main-v1_9.xsl'" R00001.xml


    I don't get a .ps or pdf.


    This works when I am using fosi instead of XSL-FO on versin 5.3, but will not work on 5.4. Any suggestions.


    Allissa Leach

    18-Opal
    August 17, 2012
    Hi Allissa--



    The first thing I would try is to launch PE Interactive, open your target file R00001.xml, and enter your command (the part in quotes after the -c in your example below) in the Arbortext command window. Hopefully you will get some error messages indicating why PE can't process the request.



    You can also check the PE transaction archive to see if there is information there on why the jobs failed. You can access this from the main PE web interface page, usually found at (where {peserver} is the name or address of your PE server machine, or "localhost" if you are accessing it from the PE server itself).



    --Clay





    Clay Helberg

    Senior Consultant

    TerraXML


    1-Visitor
    August 17, 2012

    Thank you Clay. Using the PEI was ideal.



    We will e ableto create PDFs of our files unattended. Thanks again.



    Allissa Leach

    18-Opal
    August 17, 2012
    You're welcome, glad it worked out.





    Clay Helberg

    Senior Consultant

    TerraXML