File Mover Blog

  • 05 May

    Check pdf pagewidth in order to move files to a different folder

    Q: A big help would also be a width check. If pdf width > 300 mm move to another folder. Then I could use some system tools on the pdf.

    A: In version v2022.5.5.0 we added some Pascal Script function to achieve this.

    -First we added two WIN destinations.

    • Destination with ID1 should contain the pdf files with a width <= 300 points
    • Destination with ID2 should contain the pdf files with a width > 300 points

    Limagito File Mover multiple Windows destinations

    -Next you’ll some Pascal Script

    Limagito FileMover Pascal Script option

    -Please Add and Enable ‘On Destinations

    Var
      tmpCount: Integer;
      tmpHeight, tmpWidth: Double;
      tmpFile: String;
    Const
      ctMaxWidth = 300;  
    Begin
      psExitCode:= -1;
      // ... add your code here
      tmpFile := psFilePath + psFileName;
      If psPdfGetPageCount(tmpFile, '', tmpCount) Then
        psLogWrite(1, '', 'Page Count of ' + tmpFile +' : ' + IntToStr(tmpCount));
      If psPdfGetPageHeight(psFilePath+psFileName, '', 1, tmpHeight) Then
        psLogWrite(1, '', 'Page Height of ' + tmpFile + ' : ' + FloatToStr(tmpHeight));
      If psPdfGetPageWidth(psFilePath+psFileName, '', 1, tmpWidth) Then
      Begin
        psLogWrite(1, '', 'Page Width of ' + tmpFile + ' : ' + FloatToStr(tmpWidth));
        // Check Width
        // Pdf Files <= ctMaxWidth should go to DestinationID 1 
        // Pdf Files > ctMaxWidth should go to DestinationID 2    
        If (psDestinationID = 'ID1') And (tmpWidth <= ctMaxWidth) Then psExitCode := 1; 
        If (psDestinationID = 'ID2') And (tmpWidth > ctMaxWidth) Then psExitCode := 1;  
      End
      Else
      begin
        // Error Loading Pdf File, set psExitCode to 0
        psExitCode := 0;
      End;   
    End.
    

    Limagito File Mover Pascal Script

    – RunTime Log Result:

    Limagito File Mover RunTime Log result

    #Filetransfer #PDF

    If you need any info about this ‘Check pdf pagewidth’ option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Pascal Script PDF ,
  • 01 May

    Image Automation with Limagito File Mover

    On request we are adding an Image Automation option as Destination. At this moment the base code is ready so now we can start adding options to this ‘IMG’ as Destination option.

    Some screenshots to give you an idea:

    • IMG as Destination option was Added

    Limagito File Mover Image Automation as Destination

    • At this moment you can select ‘Output to File’ and ‘Rotate Image’.

    Limagito File Mover Image Automation Setup

    • Rotate options Setup

    Limagito File Mover Image Automation Setup

    • Output to File Setup

    Limagito File Mover Image Automation Setup

    • RunTime Log Result

    Limagito File Mover RunTime Log result

    Limagito File Mover Image Automation

    #Filetransfer #IMAGE

    If you need any info about this ‘Image Automation’ option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Image ,
  • 23 Apr

    Linux FTP server issue when files have a space preceding the filename

    Linux FTP server issue when files have a space preceding the filename

    Q: We have an issue where the source file (Linux) might have a space preceding the name. Example “ file-with-a-space.jpg”. Limagito on Windows sees it as “file-with-a-space.jpg” and attempts to retrieve. The Linux server returns a 500 error, file not found error. We receive the error every minute until someone manually fixes. I want limagito to output a text file with the source path. That will get picked up by a Linux server that will automate a fix, but it needs to know where to look (hence the source path).

    A: Ok we installed a Linux system and did some tests. A new build of our file mover is ready (v2022.4.23.0) where we added a new option called ‘Use Prefer Nlst’.

    Important, only available with our second API vendor: ‘Vendor 2 – CK’.

    Limagito File Mover Space Preceding Filename

    Please enable the ‘Use Prefer Nlst’ option in the ‘Common’ tab of the Source FTP setup. Also enabling ‘Delete Invalid Characters’ is a good idea with Linux (Unix, Mac) FTP servers because they may use invalid characters for Windows filenames.

    Limagito File Mover Linux FTP Space Preceding Filename

    #Filetransfer #Linux #FTP

    If you need any info about this ‘space preceding the filename’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team FTP , ,
1 56 57 58 59 60 61 62 148
SEARCH