Skip to main content
1-Visitor
November 17, 2011
Question

command line-print compose

  • November 17, 2011
  • 7 replies
  • 2688 views
We use Datalogics DL composer, and it has length limits to amount of pages
we can produce, typically maxs out at 2,700 pages. We have been testing
PTC's Print Compose and it is faster and go farther. The issue is we
programmically produce this 16,000+ page manual that is 210 megs large (6
million lines). Arbortext Editor cannot open the file, so we cannot print
it or find how many pages is the limit Print Compose before we have to cut
apart this manual.

Is there a command line or input folder we can toss this large file to have
it run.

    7 replies

    1-Visitor
    November 17, 2011
    Theoretically you should be able to open it in 64-bit Editor.
    1-Visitor
    November 17, 2011
    OTOH, if you anticipate needing to 'cut it apart' anyway, pick some logical division(s) within the book and turn it into a few file entities to begin. Call those entities in place of their individual content.

    In Editor, turn off 'View+File Entities', so that all you see in the window is the file icon(s). That should let you load almost any size manual (even in 32-bit). Just be certain File Entities is 'un'checked before loading the file that calls the entities.

    Steve Thompson
    +1(316)977-0515
    1-Visitor
    November 17, 2011
    thanks. That did not work. I still get "editor.exe [A12177] Out of virtual
    memory space" I have four gig and max the virtual space. Task manager show
    about 45% of the PF usage when it quits.

    I still like to know, if I can make it command line. We do not edit the
    file, I have a builder that we want to use to send it directly to compose
    without having someone open it

    d


    On Thu, Nov 17, 2011 at 11:47 AM, EXT-Thompson, Steve <
    steve.thompson2@boeing.com> wrote:

    > OTOH, if you anticipate needing to ‘cut it apart’ anyway, pick some
    > logical division(s) within the book and turn it into a few file entities to
    > begin. Call those entities in place of their individual content.****
    >
    > ** **
    >
    > In Editor, turn off ‘View+File Entities’, so that all you see in the
    > window is the file icon(s). That should let you load almost any size manual
    > (even in 32-bit). Just be certain File Entities is ‘un’checked before
    > loading the file that calls the entities.****
    >
    > ** **
    >
    > *Steve Thompson*
    > +1(316)977-0515
    >
    > ****
    >
    > *From:* Benton, Ed L [
    18-Opal
    November 17, 2011
    Hi Doug--



    Try this from a Windows command prompt:



    "C:\Program Files\PTC\Arbortext Editor\bin\editor.exe" -c "print"
    filename.xml



    That should print in batch mode, without opening the doc in an Editor
    window.





    --C





    Clay Helberg

    Senior Consultant

    TerraXML


    1-Visitor
    November 17, 2011
    That sounds very good. Off to testing.

    d


    1-Visitor
    November 23, 2011

    Clay,


    This worked like a charm. However, is there a way to define the output file name (pdf output) without having to be prompted for it?

    18-Opal
    November 23, 2011
    Hi Joseph--



    You might have to write an ACL script to set this up. In the script, you
    would need to define an array of parameters that you can pass to the
    compose::compose_for_pdf() function, and add the output file name you
    want to that array. Here is a sample script that does the bare minimum
    setup, to generate the PDF in the same location as the source file, with
    the same basename and ".pdf" extension. (In other words, "MyDoc.xml"
    will be published as "MyDoc.pdf".)



    # batch print a document



    require compose;



    function batch_print(doc = current_doc()) {

    # init params

    local params[];



    # derive output filename

    params['outputFile'] = compose::set_output_file( doc, 'preview',
    ".pdf");



    # set interactive off so it knows we're in batch mode

    params['interactive'] = 0;



    # add stylesheet param

    params['stylesheet'] = compose::get_doc_stylesheet(doc,
    "printstylesheet", "pdf");



    #compose

    compose::compose_for_pdf(doc,params);

    }



    # go ahead and call the function now

    batch_print();



    If you put this code into a file batchprint.acl, you should be able to
    invoke it in a batch file by putting "source batchprint" into the -c
    parameter argument, like so:



    "C:\program files\PTC\Arbortext Editor\bin\x64\editor.exe" -styler -c
    "source batchprint" Document1.xml



    HTH



    --Clay



    Clay Helberg

    Senior Consultant

    TerraXML


    1-Visitor
    February 21, 2018

    Are these functions and syntax relevant to Arbortext Editor 6.0?

    I found an article on the PTC community, Document - CS233804, that uses fewer local params, but I'm having difficulty getting either example to run.

    function test_cfg::test2() {
      local params[];
      params[ "outputFile"  ] = '[path_to]\test-out.pdf';
      params[ "stylesheet"  ] = '[path_to]\doctypes\axdocbook\axdocbook.style';
      local rc = compose::compose_for_pdf( current_doc(), params );
      return rc;
    }