Skip to content

Issue when page count do not match with sample document #12

Description

@tomas-lakatos

Hello,

Our client has found a problem. They erronously scanned less pages, than the document normally contains. This results in multiple runtime errors, for example when trying to move zones on the page that does not exist.

The examples of my fixes:

Private Sub SL_CalculatePageShift_LocateAlternatives(ByVal pXDoc As CASCADELib.CscXDocument, ByVal pLocator As CASCADELib.CscXDocField)
...
         'ZonesExist(AZLDef.Zones(Z).PageNr)=True
         If AZLDef.Zones(Z).PageNr <= pXDoc.Pages.Count-1 Then 'TLA
            ZonesExist(AZLDef.Zones(Z).PageNr)=True
         End If 'TLA


Public Sub Zones_Shift(AZLZones As CscAdvZoneLocZones, Shifts As CscXDocFieldAlternatives, Rep As CscXDocRepresentation)
...
      If (AZLZones(Z).PageNr <= Rep.Pages.Count - 1) Then 'TLA
         Set XDocZone=Zone_Shift(AZLZones(Z),Shifts,Rep)
         Rep.Zones.Append(XDocZone)
      End If 'TLA

If I find more issues with this script because of the incorrect number of scanned pages, I'll try to update.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions