Author Topic: Line2PDF viewer/transform anyone?  (Read 446 times)

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Line2PDF viewer/transform anyone?
« on: August 16, 2019, 06:40:00 AM »
Running ICN 3.0.6 on AIX with ODWEK 9.5 and OnDemand on z/OS DB2 V11.1.  I'd like to use the Line2PDF viewer documented in the ICN documentation but not sure where to find it.  I found indication that it is provided with CMOD 9.5 but it is nowhere to be found.  I also looked in CMOD 10.1 not to be found either.  Can anyone point me in the right direction?

Darrell Bryant

  • Jr. Member
  • **
  • Posts: 41
  • Sed fugit interea fugit inreparabile tempus-Virgil
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #1 on: August 16, 2019, 08:08:08 AM »
I believe you are looking for the arsxline command.
#IBMi #iSeries #PDF #XML #OS400 Indexer #ASM

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #2 on: August 16, 2019, 08:15:45 AM »
Thanks but I think that's just a utility to convert line data to UTF-8.  I'm looking for the Line2PDF transform which ICN can use to convert line-data to PDF form (instead of using the line data viewer java applet)

Stephen McNulty

  • Jr. Member
  • **
  • Posts: 48
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #3 on: August 16, 2019, 08:52:52 AM »
the knowledge base says to contact your ibm rep.  https://www.ibm.com/support/knowledgecenter/en/SSEUEX_3.0.2/com.ibm.installingeuc.doc/eucco080.htm

I would expect the Line2pdf transform to be under your odwek install (not familiar where this would be on z/OS)
#ISERIES #ODWEK #XML

Darrell Bryant

  • Jr. Member
  • **
  • Posts: 41
  • Sed fugit interea fugit inreparabile tempus-Virgil
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #4 on: August 16, 2019, 09:36:22 AM »
arsxline converts line to UTF-8 or PDF

        -a <cc_type> carriage control (default A - ANSI, M - Machine, N - None)         
        -c <cp> input data code page (default: 500)                                     
        -d <rec_delim> record delimiter (default: 0A)                                   
        -f <rec_fmt> record format (default F - Fixed, V - Variable, S - Stream)       
        -F <font_name> font name (default: Courier)                                     
        -g <pdf_image_file> pdf image file (.png or .jpg)                               
        -G <pdf_image_position> pdf image file position (default: 0,0 left,top)         
        -h <page_height> page height (default: 792)                                     
        -i <inp_file> input file                                                       
        -k <overstrike_mode> overstrike mode (default M - Merge, S - Separate, F - Full)
        -K <pdf_image_mode> pdf image mode (default A - All, F - First, L - Last)       
        -l <rec_len> fixed record length (default: 133)                                 
        -m <margin> margin (default: 36,36,36,36 top,bottom,left,right)                 
         -n <font_size> font size (default: 12)                                           
         -o <out_file> output file                                                       
         -O <orientation> (P - Portrait, L - Landscape)                                   
         -p <prmode> presentation mode (default N - None, 1 - SOSI1, 2 - SOSI2, 3 - SOSI3)
         -P <parm_file> parameter file                                                   
         -q <lines_per_page> lines per page (default: 0)                                 
         -Q <lines_per_print_page> - lines per print page (default: 0)                   
         -s <line_spacing_factor> line spacing factor (default: 1.6)                     
         -t <trc> trc (default 0 - No, 1 - Yes)                                           
         -w <page_width> page width (default: 612)                                       
         -x <transform_type> transform type (default U - UTF8, P - PDF)                   
         -1 <trace_file> Trace file                                                       
         -2 <trace_level> Trace level                                                     
#IBMi #iSeries #PDF #XML #OS400 Indexer #ASM

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #5 on: August 16, 2019, 11:52:53 AM »
Yes.  I did read the 'contanct your ibm rep.' which I don't know what that means.  This is on an AIX environment.  ICN and ODEWK both reside on AIX.  The Ondemand Server is on z/OS.  I looked in the /opt/IBM/ondemand/V9.5/www directories where ODWEK is installed but do not see any line2pdf.* files at all.

Darrell Bryant

  • Jr. Member
  • **
  • Posts: 41
  • Sed fugit interea fugit inreparabile tempus-Virgil
    • View Profile
« Last Edit: August 19, 2019, 05:33:01 AM by Darrell Bryant »
#IBMi #iSeries #PDF #XML #OS400 Indexer #ASM

rjrussel

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #7 on: August 17, 2019, 08:57:38 AM »
Darrell is 100% correct. The arsxline command is used to convert, among other things, line 2 PDF. It is a free utility that ships with all OnDemand platforms that can be used with ICN to view line data as PDF. You are certainly more than welcome to purchase Ricohs transform but in this case you don't need to. Here is an example of how one might edit the their transform.xml file to leverage arsxline when viewing line as PDF in ICN (this is assumes 10.1.0.4):

<transform>
    <TransformName>LINE2PDF</TransformName>
    <TransformDescription>ARSXLINE Line Data Transform for OnDemand</TransformDescription>
    <OutputMimeType>application/pdf</OutputMimeType>
    <OutputExtension>pdf</OutputExtension>
    <ODFileType>L</ODFileType>

    <CmdParms>
      <CCANSI>-a A</CCANSI>
      <CCMACHINE>-a M</CCMACHINE>
      <CCNONE>-a N</CCNONE>
      <CODEPAGE>-c</CODEPAGE>
      <LINEDELIMITER>-d</LINEDELIMITER>
      <RECORDFORMATFIXED>-f F</RECORDFORMATFIXED>
      <RECORDFORMATVARIABLE>-f V</RECORDFORMATVARIABLE>
      <RECORDFORMATSTREAM>-f S</RECORDFORMATSTREAM>
      <FONTNAME>-F</FONTNAME>
      <PAGEHEIGHTPIXELS>-h</PAGEHEIGHTPIXELS>
      <RECORDLENGTH>-l</RECORDLENGTH>
      <MARGIN>-m</MARGIN>
      <FONTSIZE>-n</FONTSIZE>
      <PRMODENONE>-p N</PRMODENONE>
      <PRMODESOSI1>-p 1</PRMODESOSI1>
      <PRMODESOSI2>-p 2</PRMODESOSI2>
      <PRMODESOSI3>-p 3</PRMODESOSI3>
      <LINEPERPAGE>-q</LINEPERPAGE>
      <LINEPERPRINTPAGE>-Q</LINEPERPRINTPAGE>
      <LINESPACINGFACTORDIV100>-s</LINESPACINGFACTORDIV100>
      <TRCNO>-t 0</TRCNO>
      <TRCYES>-t 1</TRCYES>
      <PAGEWIDTHPIXELS>-w</PAGEWIDTHPIXELS>
      <INPUTFILE>-i</INPUTFILE>
      <OUTPUTFILE>-o</OUTPUTFILE>
    </CmdParms>

    <CmdLineExe>c:\program files\ibm\V10.1\bin\arsxline.exe</CmdLineExe>
    <OperationName>Line to PDF Exe</OperationName>
    <Passthru>
        <cmdlineparm>-x P</cmdlineparm>
    </Passthru>
  </transform>


Thanks,

Rob

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #8 on: August 17, 2019, 11:13:24 AM »
Thanks!  This helps.  I give that a  shot and report back.

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #9 on: August 17, 2019, 02:01:24 PM »
So I created the transform.xml for CMOD V9.5 on AIX.  I used the "line2pdf-default" transform name but am receiving the following:

CIWEB1807: The line data file could not be converted to a PDF file by using the Line2PDF configuration file.
The custom transform configuration file, transform.xml, does not include an entry for a Line2PDF transform.
Ask your administrator to update the custom transform configuration file for the repository.


I've confirmed the location of the transform.xml and included it in the Repository being used as documented in the manual.  Here's my transform.xml:

<?xml version="1.0" encoding="utf-8"?>
<Transforms>   
 <transform>
     <TransformName>line2pdf-default</TransformName>
     <TransformDescription>ARSXLINE Line2PDF transform</TransformDescription>
     <OutputMimeType>application/pdf</OutputMimeType>
     <OutputExtension>pdf</OutputExtension>
     <ODFileType>L</ODFileType>
     <CmdParms>
        <CCANSI>-a A</CCANSI>
        <CCMACHINE>-a M</CCMACHINE>
        <CCNONE>-a N</CCNONE>
        <CODEPAGE>-c</CODEPAGE>
        <LINEDELIMITER>-d</LINEDELIMITER>
        <RECORDFORMATFIXED>-f F</RECORDFORMATFIXED>
        <RECORDFORMATVARIABLE>-f V</RECORDFORMATVARIABLE>
        <RECORDFORMATSTREAM>-f S</RECORDFORMATSTREAM>
        <FONTNAME>-F</FONTNAME>
        <PAGEHEIGHTPIXELS>-h</PAGEHEIGHTPIXELS>
        <RECORDLENGTH>-l</RECORDLENGTH>
        <MARGIN>-m</MARGIN>
        <FONTSIZE>-n</FONTSIZE>
        <PRMODENONE>-p N</PRMODENONE>
        <PRMODESOSI1>-p 1</PRMODESOSI1>
        <PRMODESOSI2>-p 2</PRMODESOSI2>
        <PRMODESOSI3>-p 3</PRMODESOSI3>
        <LINEPERPAGE>-q</LINEPERPAGE>
        <LINEPERPRINTPAGE>-Q</LINEPERPRINTPAGE>
        <LINESPACINGFACTORDIV100>-s</LINESPACINGFACTORDIV100>
        <TRCNO>-t 0</TRCNO>
        <TRCYES>-t 1</TRCYES>
        <PAGEWIDTHPIXELS>-w</PAGEWIDTHPIXELS>
        <INPUTFILE>-i</INPUTFILE>   
        <OUTPUTFILE>-o</OUTPUTFILE>
    </CmdParms>
    <CmdLineExe>/opt/IBM/ondemand/V9.5/bin/arsxline</CmdLineExe>
    <OperationName>arsxline</OperationName>
    <Passthru>
        <cmdlineparm>-x P</cmdlineparm>
    </Passthru>
   </transform>
« Last Edit: August 17, 2019, 02:07:29 PM by rjchavez »

rjchavez

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #10 on: August 18, 2019, 06:48:12 AM »
Thanks all for the help and ideas.  I was able to get it to work with the following transform.xml.  The documentation and rjrussel's recommended transform had issues with incompatibility errors when I tried using it.  I also had to add the record format switch to Variable otherwise the document would not display properly.

<?xml version="1.0" encoding="utf-8"?>
<Transforms>
 <transform>
     <TransformName>line2pdf-default</TransformName>
     <TransformDescription>ARSXLINE Line2PDF transform</TransformDescription>
     <OutputMimeType>application/pdf</OutputMimeType>
     <OutputExtension>pdf</OutputExtension>
     <ODFileType>L</ODFileType>
    <CmdParms>
      <CCANSI>-a A</CCANSI>
      <LINEDELIMITER>-d</LINEDELIMITER>
      <INPUTFILE>-i</INPUTFILE>
      <OUTPUTFILE>-o</OUTPUTFILE>
    </CmdParms>
    <CmdLineExe>//opt//IBM//ondemand//V9.5//bin//arsxline</CmdLineExe>
    <OperationName>arsxline</OperationName>
    <Passthru>
        <cmdlineparm>-x P -a A -f V</cmdlineparm>
    </Passthru>
   </transform>
</Transforms>

rjrussel

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #11 on: August 18, 2019, 09:28:57 AM »
Yes, that's why I said 10.1.0.4.

When you get there you should use what I posted as it will handle 99.9 percent of your line transform cases.

ODSA

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #12 on: January 22, 2020, 10:45:01 AM »
Hi All,
Does this transform works only for downloads or for viewer too?
I already have some customized code to convert the linedata to PDF when download or send it as email. I am looking for a solution which will do the conversion for viewer also.

Thanks ahead!

rjrussel

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
Re: Line2PDF viewer/transform anyone?
« Reply #13 on: January 23, 2020, 11:33:03 AM »
It should work for the viewer too.