This discussion is archived
3 Replies Latest reply: Apr 24, 2012 9:13 AM by ArtashesGamarian RSS

jvue print sheet size

932515 Newbie
Currently Being Moderated
i using Jvue 20.1 version to printing file .i am using different sheet size file to print with Jvue.
when i try to print A3 sheet size single file ,it printed in A3 size.if batch print (mixed A4 and A3) all files are printed in A4 formats.where printer support both A4 and A3 .

i want to know there is any Parameter in applet to specify sheet Size to print or any JavaScript function.

Edited by: 929512 on Apr 23, 2012 4:25 AM
  • 1. Re: jvue print sheet size
    ArtashesGamarian Explorer
    Currently Being Moderated
    You will need to use com.cimmetry.jvue.JVue.printFile() API and specify paper size in PrintOptions.
    com.cimmetry.common.PrintProperties: getOptions().setPaperSize().
    Use PrintOptions.PAPER_A4 or PrintOptions.PAPER_A3.
  • 2. Re: jvue print sheet size
    932515 Newbie
    Currently Being Moderated
    Thanks for replay.

    i changed this exisiting code to following as
    function myFunction()
    {
    var myApp = window.document.applets["JVue"];window.document.applets["JVue"].getActiveVueBean().getProfile().addString("PRINTOPTIONS", "PRINTERNAME","PDF Printer");
    var pPropsClass = myApp.getClass("com.cimmetry.common.PrintProperties");
    var pProps = pPropsClass.newInstance();
    pProps.setProfile(myApp.getActiveVueBean().getProfile());

    // API and specify paper size in PrintOptions.
    // com.cimmetry.jvue.JVue.printFile()
    //com.cimmetry.common.PrintProperties:
    pProps.getOptions().setPaperSize(PAPER_A4);
    // PrintOptions.PAPER_A4
    //PrintOptions.PAPER_A3.


    var vectorClass = myApp.getClass("java.util.Vector");
    var fileList = vectorClass.newInstance();
    var vList="server://ADMIN24 04 12 08 56 26 890\\703178\\A3.jpg";
    var SplitResult = vList.split(',');
    for (i=0;i<SplitResult.length;i++)
    {
    var filepathe=SplitResult.toString();
    fileList.addElement(filepathe);
    myApp.batchPrint(fileList,pProps,true,true);
    var vcomp = myApp.waitForLastMethod();
    BatchPrint();
    }
    }

    i want to know this correct pProps.getOptions().setPaperSize(PAPER_A4);
  • 3. Re: jvue print sheet size
    ArtashesGamarian Explorer
    Currently Being Moderated
    You can either use:
    var PAPER_A3 = 8;
    var PAPER_A4 = 9;
    pProps.getOptions().setPaperSize(PAPER_A4);

    ...or if you don't want to care about constants and OK with slightly ugly code then:
    pProps.getOptions().setPaperSize(pProps.getOptions().PAPER_A4);

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points