Printing Aras forms in 11SP15

Good morning all, I have an Aras form for non-conforming material that needs to be printed in order to travel with the bad part. I already have the separate form designed with view type=print, but i'm looking for documentation on additional configuration options, such as:

1. The Printable View action (File/Printable View, Toolbar Print icon) displays a preview popup window and then downloads a PDF. Is this the only option? Can I send the print job to my default printer instead?

2. The Printable View appears to be oriented in Landscape regardless of the dimensions I set on the form. When I print the PDF (even with my printer set to Portrait), the form prints in Landscape. Is there a way to change this?

3. Is there a way to call an item form to be printed programmatically?

Thanks,

Paul S

Parents
  • Well, SSRS to regular PDF of course is doable with a much less amount of effort than directly accessing the printer. This option can be used with regular Aras report items and you do not have to use code at all. 

    For your 2nd option: I am not sure about this one, but there is a PrintingToPdf.js in the codetree with these suspicious lines of code:

    var screenHeight = 595; //A4 ppt coming from pdf format
    var screenWidth = 842; //A4 ppt coming from pdf format

    In 11SP15 its located here: ..\Innovator\Client\Modules\aras.innovator.Printing\Scripts\Classes

    For starting the print programmatically you maybe can use the code used for the CUI element.

Reply
  • Well, SSRS to regular PDF of course is doable with a much less amount of effort than directly accessing the printer. This option can be used with regular Aras report items and you do not have to use code at all. 

    For your 2nd option: I am not sure about this one, but there is a PrintingToPdf.js in the codetree with these suspicious lines of code:

    var screenHeight = 595; //A4 ppt coming from pdf format
    var screenWidth = 842; //A4 ppt coming from pdf format

    In 11SP15 its located here: ..\Innovator\Client\Modules\aras.innovator.Printing\Scripts\Classes

    For starting the print programmatically you maybe can use the code used for the CUI element.

Children
  • I guess you will need to change Line 133:

    var pdfDoc = new JsPDF('l', 'pt', 'a4');

    The 1st paramter defines landscape (l) or portrait (p). 

    It´s a interesting piece of code. I am actually were locking for something similar for a different use case :-)

  • //var pdfDoc = new JsPDF('l', 'pt', 'a4');
    var pdfDoc = new JsPDF('p','pt','letter');

    modifying the pdfDoc variable with the above code correctly changed the default form printing orientation from Landscape to Portrait!

    This resolves item #2 from my original post. I'm still exploring using SSRS reports to do the rest of this...but I thought other users would like a solution on how to modify Aras to print forms in Portrait orientation by default. Thanks Angela!

    paul