FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TPRINTER
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
TPRINTER
Posted: Mon Jul 14, 2014 08:35 AM

Is there a way to switch between oPrn:setportrait() and oPrn:setlandscape() in the same printjob. (without ENDPRINT before switching)?

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: TPRINTER
Posted: Tue Jul 15, 2014 02:01 PM

Has anyone a idea?? Its badly needed. Thanks!

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TPRINTER
Posted: Tue Jul 15, 2014 02:27 PM

Günther,

Do you have a small test program that shows the problem?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TPRINTER
Posted: Tue Jul 15, 2014 02:31 PM

Günther,

I guess that you mean to do such change from one page to another page, right ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: TPRINTER
Posted: Tue Jul 15, 2014 08:40 PM

Thanks for your response! Yes, Antonio, from one page to another. If i now do so, the coordinates are wrong from page to page!

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TPRINTER
Posted: Tue Jul 15, 2014 08:44 PM

Günther,

Could you provide a small example of how you are doing it ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: TPRINTER
Posted: Tue Jul 15, 2014 09:04 PM
Antonio,
Code (fw): Select all Collapse
oPrn := Printbegin(....)
PAGE
oPrn:setlandscape()
oPrn:say(.....)
ENDPAGE
PAGE 
oPrn:setportrait()
oPrn:say(....)
ENDPAGE
ENDPRINT
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TPRINTER
Posted: Thu Jul 17, 2014 04:44 AM
Günther,

I have tried this example:

Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oPrn

   PRINTER oPrn PREVIEW
      PAGE
         oPrn:setlandscape()
         oPrn:say( 1, 1, "One" )
      ENDPAGE
      PAGE 
         oPrn:setportrait()
         oPrn:say( 1, 1, "One" )
      ENDPAGE
   ENDPRINT

return nil


Though the preview is not changing from landscape to portrait, it seems as the text is really different on each page.

I appreciate your comments, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: TPRINTER
Posted: Fri Jul 18, 2014 01:10 PM

Antonio, the print are always on ALL pages in the last called format (portrait or landscape)! Is there no way to switch from one to another format from page to page?
BUT ONLY, if PREVIEW is active this wrong behavoir is present!

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TPRINTER
Posted: Sat Jul 19, 2014 03:33 AM

Günther,

Do you mean that you would like to see the second page on landscape from the preview ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: TPRINTER
Posted: Sat Jul 19, 2014 09:13 AM

Antonio, in your above code the second page are also in landscape not as portrait as programmed. WITH preview the print-output is as the preview shows and all pages are in the last programmed format. WITHOUT preview the print-output seems to be ok.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TPRINTER
Posted: Sat Jul 19, 2014 09:18 AM

Günther,

My guess is that the preview does not support the change of orientation from page to page,

That is something that may require many changes, so we can not provide an inmediate fix for it, sorry

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: TPRINTER
Posted: Sun Jul 20, 2014 07:18 AM

Hi.
I had the same problem years ago and I solved using for that pages the print using fonts with escapement at 900.
It's an hard work, I know, but is the only solution I found.
Happy sunday.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TPRINTER
Posted: Sun Jul 20, 2014 05:27 PM

How about just printing three separate reports in the needed order? You might have to programmatically adjust the page numbers, but I think this could be done. To the user it would just seem like one report.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: TPRINTER
Posted: Sun Jul 20, 2014 07:28 PM

James,

Günther want mixed orientations in a single preview and this is not possible with the current preview class.

EMG