4 Replies Latest reply: Dec 8, 2016 3:56 PM by Lech Miszkiewicz RSS

    NPrinting 17.1 - export HTML to destination (folder) issue

    Lech Miszkiewicz

      Hello everyone.


      I am facing silly issue with NPrinting 17.1 when trying to export HTML report to specific folder destination. It sort of works. Report is distributed to destination (ZIPPED FOLDER, folder name is is the report name, but HTML file inside has scrambled name and is referencing to other files sitting in "Documents" location.

      What i want to achieve is:

      • export to particular folder HTML report which will not be zipped, and html file will have always the same name
      • also if possible i would like to have all related files (images etc) in subfolder there

      Is that possible?


      Any help will be much appreciated


      kind regards


        • Re: NPrinting 17.1 - export HTML to destination (folder) issue
          Daniel Jenkins

          Hi Lech,


          Yes, NPrinting 17.x generates zip files that contain the HTML file. In my testing so far, this is a single HTML file that has all images etc. embedded

          One workaround could be to use a tool like 7-zip. You can create a batch file and schedule it to periodically check for zipped files in your NPrinting destination folder and unzip them into a temporary holding folder from where the MOVE command can be used to move & rename the extracted HTML file to your final destination folder.


          Let's say you want the html file to always have the name Result.html. Here is my sample batch file which is self explanatory:



          @ECHO OFF

          SET "srcdir=C:\Temp\FromDir" REM Source folder (NPrinting destination folder)

          SET "tgtdir=C:\Temp\ToDir" REM Target folder (Final destination folder)

          SET "tmpdir=C:\Temp\extracted-tmp" REM Temporary holding folder

          REM empties the temporary holding folder

          DEL /q "%tmpdir%\*"

          REM although the temporary holding folder should have only one .zip file

          REM I still use a loop as I don't know the name of the .zip file

          REM You could remove the loop and hard code the name in place of "%%Z"

          REM We will never know the name of the extracted HTML file hence the second

          REM FOR loop

          FOR %%Z IN ("%srcdir%\*.zip") DO (

            "C:\Program Files\7-Zip\7z.exe" e "%%Z" -o"%tmpdir%

              FOR %%I IN ("%tmpdir%\*") DO MOVE "%%I" "%tgtdir%\Result.html"




          HTH - Daniel.