Content Management and Capture

 View Only
  • 1.  Conversion Actions in Datacap

    InnerCircle
    Posted Thu May 26, 2022 01:10 PM

    We are converting HTML files to images in Datacap before they are being viewed by people. Since HTML files don't have a page count inherently, we are looking for a way to add that to each individual image file that is created from that HTML file.

    So for example. If we get a large HTML file that gets converted into 5 individual .tif files, we want page 1 to say page "1 of 5", 2 to say "2 of 5", and so on. Is there a way to add that count to pages? Has anyone attempted this?

    Thanks



    ------------------------------
    Samuel Neville
    ------------------------------


  • 2.  RE: Conversion Actions in Datacap

    Posted Fri May 27, 2022 02:19 AM
    Our project uses OpenCV to put alphabets and words on a tif. File. Once OpenCV writes a text, tif is saved into PNG format. I don't know if it can save back to TIF format.

    ------------------------------
    dsakai
    ------------------------------



  • 3.  RE: Conversion Actions in Datacap

    Posted Fri May 27, 2022 04:42 AM
    I presume you are using the HTMLtoImage  od Convert.HTML libraries.

    I think you have to create a custom action for this. This is because everything you want to do is before setting the type of pages and split to documents. This is done automatically if you create first the documents, respectively each HTML a document.
    I think your problem is that  at import of the HTML file you cannot display them before accept by user

    For a custom action:
    you must use the original HTML file name and this msut be saved as anew batch parameter on batch.xml.
    then you have to have a new counter page counter parameter on each tiff page level and a LastHTMLPagenr representing the total number of pages of the current HTML.
    Each time the original HTMl is a new one you have to
    save the counter as total number of pages of the last HTML file in this LastHTMLPagenr on each TIF page of the last one 
    reset your count tiff page to 1 and
    save the new original HTML name to the batch level.
    At close batch event on batch you create a new action which set an new parameter HTMLPageNr  the LastHTMLPageNr to the previous pages of the previous HTML file.

    you may try also with a single action on batch level.
     
    I hope I did not miss anything... and it helps...
    dorothea