TPRINTER

TPRINTER

Postby byte-one » Mon Jul 14, 2014 8: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby byte-one » Tue Jul 15, 2014 2:01 pm

Has anyone a idea?? Its badly needed. Thanks!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby James Bott » Tue Jul 15, 2014 2:27 pm

Günther,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TPRINTER

Postby Antonio Linares » Tue Jul 15, 2014 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: TPRINTER

Postby byte-one » Tue Jul 15, 2014 8: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby Antonio Linares » Tue Jul 15, 2014 8:44 pm

Günther,

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

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

Re: TPRINTER

Postby byte-one » Tue Jul 15, 2014 9:04 pm

Antonio,
Code: Select all  Expand view
oPrn := Printbegin(....)
PAGE
oPrn:setlandscape()
oPrn:say(.....)
ENDPAGE
PAGE
oPrn:setportrait()
oPrn:say(....)
ENDPAGE
ENDPRINT
 
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby Antonio Linares » Thu Jul 17, 2014 4:44 am

Günther,

I have tried this example:

Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: TPRINTER

Postby byte-one » Fri Jul 18, 2014 1: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby Antonio Linares » Sat Jul 19, 2014 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: TPRINTER

Postby byte-one » Sat Jul 19, 2014 9: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: TPRINTER

Postby Antonio Linares » Sat Jul 19, 2014 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: TPRINTER

Postby Massimo Linossi » Sun Jul 20, 2014 7: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.
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: TPRINTER

Postby James Bott » Sun Jul 20, 2014 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TPRINTER

Postby Enrico Maria Giordano » Sun Jul 20, 2014 7:28 pm

James,

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8696
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: TimStone and 28 guests