revprintfield and RIGHT tabalign?

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi friends,

I am trying to print a field, but when it comes to a right aligned TAB
things go awray in the resulting PDF/printout.

LC 9.5.1, macOS 10.14.6

Please take a look here:
<https://major-k.de/temp/revprintfield.jpg>
LC field on the right, PDF on the left.
At the bottom the TAB align and TAB stops of the field to be printed

Please note the unwanted wrapping of the first two "TOTAL für..." lines!?
But it only wraps if the text exceeds a certain length?
No wrapping if I only supply the actual SUM in the TOTAL line.
What am I missing?

Thanks for any hints!


Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Klaus.
I made a test stack and printed to pdf. Mine had a long string at the right side of one line.
Everything came out fine. Mac 10.13.4, LC 9.5.1
Why are you not in the forum, where it is so easy to post screen shots?
Craig


-----Original Message-----
From: Klaus major-k via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: Klaus major-k <[hidden email]>
Sent: Thu, Feb 13, 2020 2:30 pm
Subject: revprintfield and RIGHT tabalign?

Hi friends,

I am trying to print a field, but when it comes to a right aligned TAB
things go awray in the resulting PDF/printout.

LC 9.5.1, macOS 10.14.6

Please take a look here:
<https://major-k.de/temp/revprintfield.jpg>
LC field on the right, PDF on the left.
At the bottom the TAB align and TAB stops of the field to be printed

Please note the unwanted wrapping of the first two "TOTAL für..." lines!?
But it only wraps if the text exceeds a certain length?
No wrapping if I only supply the actual SUM in the TOTAL line.
What am I missing?

Thanks for any hints!


Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi Craig,

> Am 13.02.2020 um 21:43 schrieb dunbarx--- via use-livecode <[hidden email]>:
>
> Klaus.
> I made a test stack and printed to pdf. Mine had a long string at the right side of one line.
> Everything came out fine. Mac 10.13.4, LC 9.5.1

hmmmm... :-/

> Why are you not in the forum, where it is so easy to post screen shots?

Sometimes I need a quick answer, which is not always the case in the forum.
OTH, I often do not get a helpful answer here on the list!

P.S.
Maybe I can send you the my stack privately and you send me the PDF back?

> Craig

Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Sssh.
OK.
Craig


-----Original Message-----
From: Klaus major-k via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: Klaus major-k <[hidden email]>
Sent: Thu, Feb 13, 2020 3:50 pm
Subject: Re: revprintfield and RIGHT tabalign?

Hi Craig,

> Am 13.02.2020 um 21:43 schrieb dunbarx--- via use-livecode <[hidden email]>:
>
> Klaus.
> I made a test stack and printed to pdf. Mine had a long string at the right side of one line.
> Everything came out fine. Mac 10.13.4, LC 9.5.1

hmmmm... :-/

> Why are you not in the forum, where it is so easy to post screen shots?

Sometimes I need a quick answer, which is not always the case in the forum.
OTH, I often do not get a helpful answer here on the list!

P.S.
Maybe I can send you the my stack privately and you send me the PDF back?

> Craig

Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode


> Am 13.02.2020 um 20:30 schrieb Klaus major-k via use-livecode <[hidden email]>:
>
> Hi friends,
>
> I am trying to print a field, but when it comes to a right aligned TAB
> things go awray in the resulting PDF/printout.
>
> LC 9.5.1, macOS 10.14.6
>
> Please take a look here:
> <https://major-k.de/temp/revprintfield.jpg>
> LC field on the right, PDF on the left.
> At the bottom the TAB align and TAB stops of the field to be printed
>
> Please note the unwanted wrapping of the first two "TOTAL für..." lines!?
> But it only wraps if the text exceeds a certain length?
> No wrapping if I only supply the actual SUM in the TOTAL line.
> What am I missing?
>
> Thanks for any hints!

addition: Everything looks just fine if I -> print this cd
Completely puzzled...


--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Klaus.
Yep, I get the same thing you did as pdf.
Craig

-----Original Message-----
From: Klaus major-k via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: Klaus major-k <[hidden email]>
Sent: Fri, Feb 14, 2020 8:24 am
Subject: Re: revprintfield and RIGHT tabalign?



> Am 13.02.2020 um 20:30 schrieb Klaus major-k via use-livecode <[hidden email]>:
>
> Hi friends,
>
> I am trying to print a field, but when it comes to a right aligned TAB
> things go awray in the resulting PDF/printout.
>
> LC 9.5.1, macOS 10.14.6
>
> Please take a look here:
> <https://major-k.de/temp/revprintfield.jpg>
> LC field on the right, PDF on the left.
> At the bottom the TAB align and TAB stops of the field to be printed
>
> Please note the unwanted wrapping of the first two "TOTAL für..." lines!?
> But it only wraps if the text exceeds a certain length?
> No wrapping if I only supply the actual SUM in the TOTAL line.
> What am I missing?
>
> Thanks for any hints!

addition: Everything looks just fine if I -> print this cd
Completely puzzled...


--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi Craig,

> Am 14.02.2020 um 14:50 schrieb dunbarx--- via use-livecode <[hidden email]>:
>
> Klaus.
> Yep, I get the same thing you did as pdf.

OK, thank you for testing!

I will use "print this cd" and compute the neccessary lines for mulitpage text.

But I really would like to know what is going on here with "revprintfield"?
Billiant ideas anyone?

> Craig

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
The revPrintField command predates the tabAlign property. I suspect the handler just hasn't been updated to include a transfer of that property from your display field to the print stack's field.If my hunch is correct, adding that may be a one-line pull request, in the block where the other properties are transferred.Richard GaskinFourth World Systems
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi Richard,

> Am 14.02.2020 um 15:22 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> The revPrintField command predates the tabAlign property. I suspect the handler just hasn't been updated to include a transfer of that property from your display field to the print stack's field.If my hunch is correct, adding that may be a one-line pull request, in the block where the other properties are transferred.

AHA! Thank you, so this is a bug of some sort, if i translate "predate" correctly?
Looks like this has not been reported yet, will do so and supply my teststack.

> Richard GaskinFourth World Systems

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Klaus wrote:

 > Am 14.02.2020 um 15:22 schrieb Richard Gaskin:
 >>
 >> The revPrintField command predates the tabAlign property. I suspect
 >> the handler just hasn't been updated to include a transfer of that
 >> property from your display field to the print stack's field.If my
 >> hunch is correct, adding that may be a one-line pull request, in the
 >> block where the other properties are transferred.
 >
 > AHA! Thank you, so this is a bug of some sort, if i translate
 > "predate" correctly? Looks like this has not been reported yet, will
 > do so and supply my teststack.


It may be quicker to fix it than to submit a bug report.  In fact, I put
that to the test, doing both. My hunch turned out to be correct: the fix
took less than a minute, and the bug report slightly more than a minute. :)

I used devolution's MPath tool to quickly list all the scripts in use,
and found the revPrintingLibrary.  The goal there was to find the block
where properties are transferred from the source field to the printing
field, so I search for "set the textFont".  The first hit was for the
header, but the second was in a block of code in a handler named
revPrintText.

Sure enough, there was no assignment of the tabAlign property.  Adding
one on line 138 of that script fixes the issue:


    if pSourceFieldRef is not empty then
       set the tabStops of field 1 to the tabStops of pSourceFieldRef
       set the hGrid of field 1 to the hGrid of pSourceFieldRef
       set the vGrid of field 1 to the vGrid of pSourceFieldRef
       set the fixedLineHeight of field 1 to the fixedLineHeight of
pSourceFieldRef -- NEW
       set the textHeight of field 1 to the effective textHeight of
pSourceFieldRef -- NEW
       set the textAlign of field 1 to the effective textAlign of
pSourceFieldRef
       set the tabAlign of fld 1 to the effective tabAlign of
pSourceFieldRef --NEW from RG for Klaus
    end if


Here's the report with the fix for the team to drop in so others will
have this as well:

https://quality.livecode.com/show_bug.cgi?id=22574


--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi Richard,

> Am 14.02.2020 um 16:00 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> Klaus wrote:
>
> > Am 14.02.2020 um 15:22 schrieb Richard Gaskin:
> >>
> >> The revPrintField command predates the tabAlign property. I suspect
> >> the handler just hasn't been updated to include a transfer of that
> >> property from your display field to the print stack's field.If my
> >> hunch is correct, adding that may be a one-line pull request, in the
> >> block where the other properties are transferred.
> >
> > AHA! Thank you, so this is a bug of some sort, if i translate
> > "predate" correctly? Looks like this has not been reported yet, will
> > do so and supply my teststack.
> It may be quicker to fix it than to submit a bug report.  In fact, I put that to the test, doing both. My hunch turned out to be correct: the fix took less than a minute, and the bug report slightly more than a minute. :)

OK :-)

> I used devolution's MPath tool to quickly list all the scripts in use, and found the revPrintingLibrary.  The goal there was to find the block where properties are transferred from the source field to the printing field, so I search for "set the textFont".  The first hit was for the header, but the second was in a block of code in a handler named revPrintText.
>
> Sure enough, there was no assignment of the tabAlign property.  Adding one on line 138 of that script fixes the issue:
>
>   if pSourceFieldRef is not empty then
>      set the tabStops of field 1 to the tabStops of pSourceFieldRef
>      set the hGrid of field 1 to the hGrid of pSourceFieldRef
>      set the vGrid of field 1 to the vGrid of pSourceFieldRef
>      set the fixedLineHeight of field 1 to the fixedLineHeight of pSourceFieldRef -- NEW
>      set the textHeight of field 1 to the effective textHeight of pSourceFieldRef -- NEW
>      set the textAlign of field 1 to the effective textAlign of pSourceFieldRef
>      set the tabAlign of fld 1 to the effective tabAlign of pSourceFieldRef --NEW from RG for Klaus
>   end if
>
> Here's the report with the fix for the team to drop in so others will have this as well:
> https://quality.livecode.com/show_bug.cgi?id=22574

Hm, I applied the fix here, but now the last column is completely GONE (not visible in the printout)!?

And if the TABALIGN was not repected, why did the columns (NOT the TOTAL Line)
appear correctly aligned?

> --
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Klaus wrote:

 > Hm, I applied the fix here, but now the last column is completely GONE
 > (not visible in the printout)!?

Hmmm...It worked when I tested here, but I can imagine a scenario where
the tabstops may result in a boundary outside the bounds of the field,
such as if your field is wider than the field used in the printed page.

For that you may need to add one last tabstop to make sure right-aligned
text isn't rendered outside the object's rect.


 > And if the TABALIGN was not repected, why did the columns (NOT the
 > TOTAL Line) appear correctly aligned?

tabAlign is like textAlign but for a given column (tabstop), not to be
confused with tabStops, which govern the boundaries of columns.

Left alignment is the default so those columns render well without
modification.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Hi Richard,

added a test stack to the report and some more infos.

> Am 14.02.2020 um 17:09 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> Klaus wrote:
>
> > Hm, I applied the fix here, but now the last column is completely GONE
> > (not visible in the printout)!?
> Hmmm...It worked when I tested here, but I can imagine a scenario where the tabstops may result in a boundary outside the bounds of the field, such as if your field is wider than the field used in the printed page.
> For that you may need to add one last tabstop to make sure right-aligned text isn't rendered outside the object's rect.

OK, will try that!

> > And if the TABALIGN was not repected, why did the columns (NOT the
> > TOTAL Line) appear correctly aligned?
>
> tabAlign is like textAlign but for a given column (tabstop), not to be confused with tabStops, which govern the boundaries of columns.

Go figure! :-D

> Left alignment is the default so those columns render well without modification.

Yes, but as you can see in my picture, you DID take a look, didn't you 8-),
the third columns ARE in fact right aligned but only the TOTAL... lines are not!

> --
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
This is done with "revPrintField", where it is only in the print dialog that I can divert the process to make a PDF.
What is the story with "open printing to "PDF"...?


-----Original Message-----
From: Klaus major-k via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: Klaus major-k <[hidden email]>
Sent: Fri, Feb 14, 2020 11:17 am
Subject: Re: revprintfield and RIGHT tabalign?

Hi Richard,

added a test stack to the report and some more infos.

> Am 14.02.2020 um 17:09 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> Klaus wrote:
>
> > Hm, I applied the fix here, but now the last column is completely GONE
> > (not visible in the printout)!?
> Hmmm...It worked when I tested here, but I can imagine a scenario where the tabstops may result in a boundary outside the bounds of the field, such as if your field is wider than the field used in the printed page.
> For that you may need to add one last tabstop to make sure right-aligned text isn't rendered outside the object's rect.

OK, will try that!

> > And if the TABALIGN was not repected, why did the columns (NOT the
> > TOTAL Line) appear correctly aligned?
>
> tabAlign is like textAlign but for a given column (tabstop), not to be confused with tabStops, which govern the boundaries of columns.

Go figure! :-D

> Left alignment is the default so those columns render well without modification.

Yes, but as you can see in my picture, you DID take a look, didn't you 8-),
the third columns ARE in fact right aligned but only the TOTAL... lines are not!

> --
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Klaus wrote:

 >> Am 14.02.2020 um 17:09 schrieb Richard Gaskin:
 >> Left alignment is the default so those columns render well without
 >> modification.
 >
 > Yes, but as you can see in my picture, you DID take a look, didn't you
 > 8-),
 > the third columns ARE in fact right aligned but only the TOTAL...
 > lines are not!

I've been looking at this one:
https://major-k.de/temp/revprintfield.jpg

There I see the right-most column right-aligned in the LC version only.
In the PDF the entire column appears left-aligned, apparently ignoring
the field's tabAlign property.

This is what we expect after reviewing the revPrintingLibrary code,
since "tabAlign" doesn't appear anywhere in the library, until we add it.

Do you have another image showing the PDF output where any portions of
any column are right-aligned while other columns are left-aligned?

If you do that would seem a deeper issue, perhaps in the engine, since
nothing in revPintingLibrary currently supports differing column alignments.

Indeed, based on what we can read in the code, adding the one line to
set the tabAlign resolves the issue.

In your case, bringing the last tabstop in a bit, or perhaps adding a
trailing tabstop after the ones you have in place, should account for
the additional margins present in the print stack to have that last
column visible.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
So I tried it. Works fine, though you have to use gadgetry to print only the field of interest.
on mouseUpopen printing to pdf ("/users/yourPathNameHere/desktop/xxx"& ".pdf")print this cdclose printingendmouseUp
Craig


-----Original Message-----
From: dunbarx--- via use-livecode <[hidden email]>
To: use-livecode <[hidden email]>
Cc: dunbarx <[hidden email]>
Sent: Fri, Feb 14, 2020 11:52 am
Subject: Re: revprintfield and RIGHT tabalign?

This is done with "revPrintField", where it is only in the print dialog that I can divert the process to make a PDF.
What is the story with "open printing to "PDF"...?


-----Original Message-----
From: Klaus major-k via use-livecode <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc: Klaus major-k <[hidden email]>
Sent: Fri, Feb 14, 2020 11:17 am
Subject: Re: revprintfield and RIGHT tabalign?

Hi Richard,

added a test stack to the report and some more infos.

> Am 14.02.2020 um 17:09 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> Klaus wrote:
>
> > Hm, I applied the fix here, but now the last column is completely GONE
> > (not visible in the printout)!?
> Hmmm...It worked when I tested here, but I can imagine a scenario where the tabstops may result in a boundary outside the bounds of the field, such as if your field is wider than the field used in the printed page.
> For that you may need to add one last tabstop to make sure right-aligned text isn't rendered outside the object's rect.

OK, will try that!

> > And if the TABALIGN was not repected, why did the columns (NOT the
> > TOTAL Line) appear correctly aligned?
>
> tabAlign is like textAlign but for a given column (tabstop), not to be confused with tabStops, which govern the boundaries of columns.

Go figure! :-D

> Left alignment is the default so those columns render well without modification.

Yes, but as you can see in my picture, you DID take a look, didn't you 8-),
the third columns ARE in fact right aligned but only the TOTAL... lines are not!

> --
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
dunbarx wrote:

 > This is done with "revPrintField", where it is only in the print
 > dialog that I can divert the process to make a PDF.
 > What is the story with "open printing to "PDF"...?

With regard to tabAlign, we can deduce that either syntax for generating
a PDF from revPrintField will have the same result, since "tabAlign" is
not present in revPrintingLibrary.

If, however, we skip revPrintField and print the card directly, we could
expect both forms of syntax for generating PDF output to also be
identical, but showing the correct tabAlign since we're printing the
card rather than reproducing the content via a library that doesn't yet
support tabAlign.

If the field content is always known to be less than one page that may
be a good option, provided of course the other features beyond
revPrintField's automatic pagination are not also used (header and
footer, margins, etc.).

Seems simpler to leave everything as it is with just a one-line addition
to revPintingLibrary to add support for the tabAlign feature.

Once we pin own the unique cicumstance with Klaus' last column rendering
outside the right-hand bounds of the field, I suspect it'll take no more
than a second line added to revPrintingLibrary to accommodate that tool.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Craig,

> Am 14.02.2020 um 18:00 schrieb dunbarx--- via use-livecode <[hidden email]>:
>
> So I tried it. Works fine, though you have to use gadgetry to print only the field of interest.
> on mouseUpopen printing to pdf ("/users/yourPathNameHere/desktop/xxx"& ".pdf")print this cdclose printingendmouseUp

as I worte "print this cd" works as exspected!
Did you try print to PDF with revprintfield?

> Craig

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Richard,

> Am 14.02.2020 um 17:53 schrieb Richard Gaskin via use-livecode <[hidden email]>:
>
> Klaus wrote:
>
> >> Am 14.02.2020 um 17:09 schrieb Richard Gaskin:
> >> Left alignment is the default so those columns render well without
> >> modification.
> >
> > Yes, but as you can see in my picture, you DID take a look, didn't you
> > 8-),
> > the third columns ARE in fact right aligned but only the TOTAL...
> > lines are not!
> I've been looking at this one:
> https://major-k.de/temp/revprintfield.jpg
> There I see the right-most column right-aligned in the LC version only. In the PDF the entire column appears left-aligned, apparently ignoring the field's tabAlign property.
> This is what we expect after reviewing the revPrintingLibrary code, since "tabAlign" doesn't appear anywhere in the library, until we add it.
> Do you have another image showing the PDF output where any portions of any column are right-aligned while other columns are left-aligned?

oh my, how embarrassing! :-/
Sorry, obviously I did look too long at my picture, you are of course completely right, all columns are left aligned.

> If you do that would seem a deeper issue, perhaps in the engine, since nothing in revPintingLibrary currently supports differing column alignments.
> Indeed, based on what we can read in the code, adding the one line to set the tabAlign resolves the issue.

No, after applying your fix, the right aligned collumn is completely gone/not printed!?

> In your case, bringing the last tabstop in a bit, or perhaps adding a trailing tabstop after the ones you have in place, should account for the additional margins present in the print stack to have that last column visible.

I added a dummy tabstop after my right aligned third column, but that did not change anything.

I have a workaround with "print this cd", so lets wait and see what the mothership says...

> --
> Richard Gaskin

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: revprintfield and RIGHT tabalign?

Bob Sneidar via use-livecode
Klaus wrote:

 >> Am 14.02.2020 um 17:53 schrieb Richard Gaskin:
 >> Do you have another image showing the PDF output where any portions
 >> of any column are right-aligned while other columns are left-aligned?
 >
 > oh my, how embarrassing! :-/
 > Sorry, obviously I did look too long at my picture, you are of course
 > completely right, all columns are left aligned.

No worries.  With me it's useful to double-check.  As you know from the
forums, I often get busy and reply after reading just the last few
posts, which puts myself at a disadvantage of critical info was included
earlier in the thread.  I've done that more than a few times. :)


 >> If you do that would seem a deeper issue, perhaps in the engine,
 >> since nothing in revPintingLibrary currently supports differing
 >> column alignments.
 >> Indeed, based on what we can read in the code, adding the one line to
 >> set the tabAlign resolves the issue.
 >
 > No, after applying your fix, the right aligned collumn is completely
 > gone/not printed!?
 >
 >> In your case, bringing the last tabstop in a bit, or perhaps adding a
 >> trailing tabstop after the ones you have in place, should account for
 >> the additional margins present in the print stack to have that last
 >> column visible.
 >
 > I added a dummy tabstop after my right aligned third column, but that
 > did not change anything.
 >
 > I have a workaround with "print this cd", so lets wait and see what
 > the mothership says...

Shouldn't be needed in this case.  The revPrintField command is just
script, and we know that printing the card directly does what we want.
Now we just have to identify the differences between the field on your
card and the field in the offscript printing stack revPrintField creates
and we can put a fix in your hands right now, and leave the engine team
focused on the engine.

One difference I see is that the margins of the printing field in the
PDF appear larger, leaving less room for content.

What happens if you set those margins to 0?

If that doesn't solve it feel free to email me the stack you want to
print and I'll see what scripting needs to be added to
revPrintingLibrary to handle it well.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12