IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19422 - 03/17/06 12:30 PM PDF rangeerror after setting LastPage global condition in Talk
Juan Ascoli Offline
OL Toddler

Registered: 08/24/05
Posts: 49
Loc: Crutchfield - Charlottesville,...
I'd like to activate some text objects only on the final invoice page. (One invoice data page generates 1 to n printed invoice pages.)

So, I've created a global condition called &isLastPage, which I'm setting to true or false inside my Runpage's Talk logic, as shown here:

%
% Print out each Invoice page, respecting the number of items
% that can fit on a page.
%
&isLastPage := false
&giFirstItemOnPage := 1
for(&giCurPage, 1, 1, &giNumPages)

% Identify the last item on the present page.
if( &giCurPage = &giNumPages )
% We're printing the final page.
&isLastPage := true
&giLastItemOnPage := &iNumItems
elseif
% We're not printing the final page.
&giLastItemOnPage := &giLastItemOnPage + &iMaxItemsOnPage
endif

% Print the current page, showing the two most recent tracking #'s.
execpage('OverlayInvoicePage')
showpage

% Setup the first item on the next page.
&giFirstItemOnPage := &giFirstItemOnPage + &iMaxItemsOnPage

endfor

The problem I'm seeing occurs when I attempt to Print Preview the document. During the "Converting PostScript to PDF" phase of the Preview Processing, the error message "Error converting file: rangecheck" appears, causing the Preview to abort.

I've narrowed the issue down to the "&isLastPage := true" statement inside my Talk for loop above. This is the statement which identifies the final invoice page and sets the global variable to true.

Any ideas what might be going on here, or maybe you have a different solution for handling the "last page" condition?

Thanks again for any help,
Juan

Top
#19423 - 03/17/06 05:51 PM Re: PDF rangeerror after setting LastPage global condition in Talk
Juan Ascoli Offline
OL Toddler

Registered: 08/24/05
Posts: 49
Loc: Crutchfield - Charlottesville,...
FYI, I was able to make the problem go away by checking the "Run locally" checkbox in the Print Preview dialog.

Top


Moderator:  cosimo, OL Newsgroup Support