ProcessingInfo FrameNumber Property. Gets or sets the frame number of the source frame being/to be processed. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Read Only Description
[C#]long?

[Visual Basic]
Nullable(Of Long)
n/a No Gets or sets the frame number of the source frame being/to be processed.

 

   

Notes
 

The value of this property when the Operation.ProcessingObject event is generated depends on the operation.

The event handler should change this value when a processing sequence other than the default is desired. Set this value to null to end the processing of the current set of frames.

 

   

Example
 

See the SwfImportOperation.Import method.

 

Here we import the frame at 3.5 seconds.

[C#]
Doc doc = new Doc();
using(SwfImportOperation operation = new SwfImportOperation()) {
  operation.Doc = doc;
  operation.ContentAlign = ContentAlign.Top;
  operation.ContentScaleMode = ContentScaleMode.ShowAll;
  operation.ProcessingObject += delegate(object sender, ProcessingObjectEventArgs e) {
    if(e.Info.SourceType==ProcessingSourceType.MultiFrameImage && e.Info.FrameNumber.HasValue)
      e.Info.FrameNumber = 1+(long)(e.Info.FrameRate.Value*3.5);
  };
  operation.Import(Server.MapPath("ABCpdf.swf"));
}
doc.Save(Server.MapPath("swf.pdf"));
doc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
Using theOperation As New SwfImportOperation
  theOperation.Doc = theDoc
  theOperation.ContentAlign = ContentAlign.Top
  theOperation.ContentScaleMode = ContentScaleMode.ShowAll
  AddHandler theOperation.ProcessingObject, AddressOf Processing
  theOperation.Import(Server.MapPath("ABCpdf.swf"))
End Using
theDoc.Save(Server.MapPath("swf.pdf"))
theDoc.Clear()

Private Shared Sub Processing(sender As Object, e As ProcessingObjectEventArgs)
  If e.Info.SourceType = ProcessingSourceType.MultiFrameImage _
    AndAlso e.Info.FrameNumber.HasValue Then
    e.Info.FrameNumber = 1 + CLng(e.Info.FrameRate.Value * 3.5)  End If
End Sub