Preview in Terminal Server does not look good - Antonio Help

Preview in Terminal Server does not look good - Antonio Help

Postby Cgallegoa » Sat Feb 08, 2020 6:14 pm

Hello friends.

I have an application that run perfectly on any computer, single user or network, on any version of windows, on Linux and on Mac (with emulator), but with Windows Server 2008 R2, although it runs as a fine clock, it gives me problems with the preview

This is a correct image, on any computer, operating system, network, etc.:

Image

This is the image obtained on any computer connected to Windows Server 2008 R2, with failures in the painting of the lines:

Image

As you can see, some lines are lost in the second image. We have done a lot of tests, with RPreview.prg, TMetafil.prg, etc., but we can't get it. Although it does not affect the operation of the program, it does shatter the aesthetics in the reports.

Will it be Windows Server failure or FWH failure?

Any suggestions on how we can fix it? Which may be?

Thank you for your kindness help.

Regards,
Last edited by Cgallegoa on Sat Feb 08, 2020 10:16 pm, edited 1 time in total.
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Preview in Terminal Server does not look good

Postby Otto » Sat Feb 08, 2020 8:37 pm

Hello,
We do not have these problems.
I will remember that some printer drivers had problems.
I would suggest for a test to install https://fineprint.com/ and see if this driver shows all the lines.
Please see we have changed the preview menu for invoice printing. We also support function keys.
Print invoice, for example, is F8.
Best regards
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Re: Preview in Terminal Server does not look good

Postby Cgallegoa » Sat Feb 08, 2020 10:15 pm

Otto, thanks for your answer.

I installed FinePrinte and yes, it prints all the lines, as you can see in the next image, which leads me to say that it is not a problem with Windows Server or with printers, but with FWH.

How and where can it be solved ?

Image
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Otto » Sat Feb 08, 2020 10:33 pm

How is the FIVWEWIN preview if you choose Fineprint as your printer. Is it ok?
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Cgallegoa » Sun Feb 09, 2020 2:30 am

Otto, thank you very much for your help.

With the same problem: some lines are not painted :cry:

I tested with PDFCreato too, fails too.

We have spent 4 days trying to solve the problem without success. We are increasingly sure that it is some small bug somewhere in FWH, but we have no idea where to look. We already exhausted all our knowledge.
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Antonio Linares » Sun Feb 09, 2020 7:22 am

Carlos,

FWH preview creates metafiles.

If you could grab some of them from the created ones at the Windows Server and open them in your PC, we could check if the problem comes from the metafiles
and find the difference.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Cgallegoa » Sun Feb 09, 2020 9:18 am

Antonio, thanks for your help.

Metafile emf, created in server in \users\terminalxxxx\appdata\local\temp, checked both on the server and on the terminal, as you can see, it is perfect

Image

Best regards
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Otto » Sun Feb 09, 2020 10:04 am

Hello,

Can you test with different values?
PRINT oPrn
oprn:setsize( 800, 2970 )
Please post your emf file.
We have an emf print server. I have attached the printing function.

Best regard,
Otto

Code: Select all  Expand view  RUN


static function PrintEMF( aEMF )

   local oPrn, n, cEmf, hMeta
   local lSize80     := ( GetEMFSize( cEmf )[ 1 ] <= 90 )
   local nWidth, nHeight, a

   PRINT oPrn
//   oprn:setsize( 800, 2970 )

      for each cEMF in aEMF

         PAGE
         hMeta := GetEnhMetaFile( cEMF )
         if lSize80
            a  := GetEMFSize( hMeta, oPrn:hDC, @nWidth, @nHeight )
            XPlayEnhMetaFile( oPrn:hDC, hMeta, 6, 6, nHeight + 6, nWidth + 6 )
         else
            PlayEnhMetaFile( oPrn:hDC, hMeta,, .t. )
         endif
         DeleteEnhMetafile( hMeta )
         ENDPAGE

         FErase( cEmf )

      next

   ENDPRINT

return nil

//----------------------------------------------------------------------------//


 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Antonio Linares » Sun Feb 09, 2020 1:38 pm

Carlos,

In METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd ) CLASS TPreview we use PlayEnhMetaFile()

Please replace those calls with XPlayEnhMetaFile() and lets see if that makes a difference in your case, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Cgallegoa » Sun Feb 09, 2020 6:37 pm

Antonio, thanks for your answer

If I'm not wrong, the METHOD PrintPrv is used to send the preview to the printer, and there is no problem there. Print physically perfect. The problem is when he paints the lines in the preview (only the lines, the rest is perfect). In other words, the lines look bad ONLY IN THE PREVIEW, and only in terminals connected to Windows Server (on any other computer or type of connection they look good). The preview does not fail anywhere else, neither in the physical print, nor the metafile, nor with "print screen", only in the preview of the application.

I think the route in the printing process is: TPrinter gives all the instructions of what and where (coordinates) it has to print. Then the metafile is produced and recorded on the pc. Then, FWH loads the metafile to send it to the printer or to preview it. For this last event (preview), FWH must paint the metafile content on the screen. It seems that it is in this process where the inconvenience occurs. Where do I find that process (prg or c)?
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Preview in Terminal Server does not look good - Antonio Help

Postby Cgallegoa » Sun Feb 09, 2020 8:49 pm

Otto, thanks

I think your suggestion is to physically print the metafile and that is not the problem. The metafile generated by the application is perfect. The problem occurs at the moment when the application preview on the screen any report that contains LINES (which are those that are incomplete), so I am trying to find the process that loads the metafile and paints it on the screen to see where and when the inconvenience occurs

Either that is or I'am crazy and I'am seeing everything upside down :? :D

Best regards
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests