Lazarus Grid

Lazarus Grid


Author: Taiki S

This plugin extracts values from JSON processed by Lazarus Forms.

The original image is multiplied by a grid, and values within the grid can be extracted by specifying the position of the grid.

It is also possible to retrieve the table as a CSV.

  • Main functions.

    • Apply grid to image and assign cell numbers

    • Extract and retrieve strings

    • Find cell position from strings

    • Extract table

    Output.

    • String

    • CSV


Need help?

Technical contact to tech@argos-labs.com


May you search all operations,

1. Parameter Settings

Basic Settings

  • Operation :

    Select the operation of the plug-in.

    • Draw Grid : Writes a grid and cell numbers into the image.

    • Get String: Specify a cell and get a string.

    • Get Position: Get the position of a cell by specifying a string.

    • Get Table: Specify a range and a header to get a table.


*Image Path(Image Path)(Image Path)(Image Path)
(JSON Path)*JSON Path*JSON Path*JSON Path
*px*px*px*px
*Out Image Path*Cells*String to Find*Search From
Number ColorEncodingSearch From*Header Row

DPIEncoding*Header Col

Page NumberDPIAdjusting px

CSV FormatPage NumberEncoding



DPI



Page Number





*Required

  • Image Path :

    Select the image path.

    The input format is the format available in Lazarus.

    For PDF, please use Print2Image to convert the image and then select the image path. (The resolution "DPI" is required for this.)

  • JSON Path :

    Select the path to the JSON output by Lazarus Forms.

  • px : select the path to the JSON output by Lazarus Forms.

    Specify the grid spacing. Specify in pixel (integer value).




Extended Settings (Advanced)

  • Out Image Path :

    Specify the path to output the image with the grid.

    The path must be specified as a full path including extensions.

  • Cells :

    Specify cells to get strings.

    Cells are specified as follows.

    1,3:9,3

    Specify the starting and ending cells by x,y pairs, respectively.

    x is the horizontal direction of the image (rightward) and y is the vertical direction of the image (downward).

  • String to Find :

    Enter a string to find the cell position.

    If multiple hits are found, the location of each cell is returned.

    Partial matches are also supported.

  • Search From :

    Specify a range when searching cells from a string or retrieving a table.

    Specification is done in the same way as specifying cells.

  • Header Row :

    Specify the row that will be used as the header when retrieving the table.

    Each element within this range becomes a header.

    The range should be as narrow as possible. The range should be as narrow as possible, since it will contain other values that you do not want to be headers.

  • Header Col :

    Specify the left-most column to use as a reference for column height when retrieving the table.

    Each element that falls within this range is an element of the first column.

    In this case, set the range as narrow as possible. The range should be as narrow as possible, since it will contain other values that you do not want to be headers.

  • Adjusting px :

    Adjusting value (px) when retrieving the table.

    When acquiring a table, elements are acquired using Header Row and Header Col, and the intersection of each element is acquired as the value of the table. Therefore, depending on the size of the elements, the elements at the intersection may not be retrieved properly.

    In such cases, the range of the intersection can be increased (or decreased) by entering a correction value.

    The range will be adjusted by the entered value px. A value of + increases the size and a value of - decreases the size.

  • Number Color :

    Changes the color of the cell numbers used when entering the grid into the image.

    Some image formats do not allow cell numbering.

  • Encoding :

    Enter the JSON encoding format.

    Default is UTF-8.

  • DPI :

    Enter the resolution at which the PDF is converted to an image. Default is set to 120.

    This value is also used for JSON processing since PDF is processed by Lazarus Forms and the resulting JSON is output in inches.

  • Page Number :

    Enter the page number if you want to process only specific pages when processing PDFs.

  • CSV Format : Enter the CSV format in which you want to process the PDF.

    When using multiple cells, you can change the orientation of the output results.

    The default setting is Horizontal.

    Normally, the elements found in each Cell are output horizontally in order. For example

    Element A, Element B (←Element in Cell1)

    Element C, Element D (←Element in Cell 2)

    Element E, Element F, Element G (←Element in Cell 3)

    Element H (←Element in Cell4)

If you output the Result Type as CSV in this way, the value of element G will be packed as shown below and cannot be processed as CSV normally.

Element A, Element B, Element G (← Element in Cell1)

Element C, Element D (←Element in Cell2)

Element E, Element F (←Element in Cell 3)

Element H (←Element in Cell4)

Also, since it is difficult to loop through each Cell in this format, there is an output format called **Vertical**. Using this, the output is converted as follows.
​
> Element A, Element C, Element E, Element H

Element B, Element D, Element F

                ,                , Element G

This format allows each cell to be processed vertically, so it can be handled in a loop or the total number of cells can be calculated with COUNT.

2. Return Value

  • Result Type 1.String : String

    1. CSV: CSV

    2. File : String / CSV

3. Example


    1. display the grid in the image (number in light blue)

Image Path: C:\Users\Windows\Pictures\Category.png

JSON Path:C:\Users\Windows\Pictures\Laz_Category.json

Out Image Path:C:\Users\Windows\Pictures\out_grid.png

Execution Result:

Return Value:C:\Users\Windows\Pictures\out_grid.png


  • 2. specify a Cell to get a string

Image Path: C:\Users\Windows\Pictures\Category.png

JSON Path:C:\Users\Windows\Pictures\Laz_Category.json

Execution Result:

2 Business Apps


  • Import tables as CSV

Search From: Red frame

Header Row: green frame

Header Col: Orange frame

Execution result:

Index,Category
1,Al Solutions
2,Business Apps
3,Cloud Solutions
4,Data Science
5,Email/Messenger
6,Files and Folders
7,Interactive
8,Storage Solutions
9,Utility Tools
... ,Misc



All Plugins