An unexpected error occured :(

( image file not found ( in fact file name was wrong ) )

In this case HPDF_AddPage() (_hmg_hpdf_startpage\60) doesn't worked as expected
and :

Unrecoverable error 6005: Exception error: 

For avoid such error I suggest a bit intervention on hmg_hpdf.prg :

_hmg_hpdf_startpage\59 ...


   if _HMG_SYSDATA[ 150 ][ 7 ] == nil // Page is free
      _HMG_SYSDATA[ 150 ][ 7 ] := HPDF_AddPage( _HMG_SYSDATA[ 150 ][ 1 ] )
      
      IF EMPTY( _HMG_SYSDATA[ 150, 7 ] )
         _HMG_HPDF_Error( 8 )
      ELSE
        // set page size
        HPDF_Page_SetWidth( _HMG_SYSDATA[ 150 ][ 7 ], _HMG_SYSDATA[ 150 ][ 4 ] )
        HPDF_Page_SetHeight( _HMG_SYSDATA[ 150 ][ 7 ], _HMG_SYSDATA[ 150 ][ 5 ] )
      ENDIF   
   else
      _HMG_HPDF_Error( 4 )
   endif   
  


_HMG_HPDF_IMAGE\<at end of function>


   oImage := HPDF_LoadPngImageFromFile( _HMG_SYSDATA[ 150 ][ 1 ], cImage )

   if EMPTY( oImage ) // == Nil
      _HMG_HPDF_Error( 7 )
      return nil
   endif   
   HPDF_Page_DrawImage( _HMG_SYSDATA[ 150 ][ 7 ], oImage, nxPos, nyPos - _HMG_HPDF_MM2Pixel( nImageHeight ), _HMG_HPDF_MM2Pixel(    nImageWidth ), _HMG_HPDF_MM2Pixel( nImageHeight ) )

return nil


_HMG_HPDF_Error\<at last>

   case nErr == 8
      cErr := 'Can not start new page.'


and now, prg say "cannot start new page" and start it !


