Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Printing issue with presence change just before printing

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

27-01-2009

Hi all,



Coming across a problem when firing off my printing button.



I am changing the presence of all my subforms to visible before printing and then hidden after printing.



But when I am running the xfa.host.print command the page count from xfa.host.numPages still only reads 1. I set up a message box to check it over and from what I can tell the presence is being set, then the print command is being fired before the layout has a chance to complete.



This means that it is picking up only a single page in my print command.



Is there a way to delay the print command, or for completing the relayout before the print command fires?



Many thanks,



Tom

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

27-01-2009

There are other presence settings that will allow the subform to be only printed or only on the screen (+print and -print). Perhaps you shoudl use these instead of visible/invisible.

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

27-01-2009

Having to build for Version 7 sadly which doesn't support it.



I'm not having a problem with making things visible/invisble anyway and prefer to go from visible to hidden as I'm changing quite a few subforms (12 to be precise) of varying heights and I only want the one they are working on to be visible normally.



The problem I'm having is that the xfa.host.numPages isn't returning an accurate number, because there is more than 1 page after my prePrint event but it keeps returning only a single page.



Does that make it any clearer?



Tom

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

27-01-2009

You could try doing an xfa.layout.relayout() but I am not sure that it will fix your issue.

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

28-01-2009

AHAH!



That's the exact command I was looking for...



Will test now and see if it works.

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

28-01-2009

Nope, its still not waiting for the layout to complete before moving on to the print command...

Avatar

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile

Avatar
Level 5
_jerome_dinnat_
Level 5

Likes

0 likes

Total Posts

180 posts

Correct Reply

0 solutions
View profile
_jerome_dinnat_
Level 5

04-02-2009

Hi,



I have the same problem to print and to make a table of content with hidden subforms.



Thanks