Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

VSPrinter8 LoadDoc Method Appears to Fail

$
0
0

I’ve created a VsPrinter8 document by scanning in some full page images and then loading each image into a separate page in the VsPrinter object.
It displays properly. It prints properly. Immediately following is the code that creates the document.
The code also uses the SaveDoc method (last line of code).
However, when I try to use the LoadDoc method to display the saved document, the display is empty even though the SaveDoc file exists and is non-empty. Why?
See the second code set is what I use to display the saved document.

First code set to create and save document in VsPrinter control
Dim i As Integer
With VSPrinter8 ‘(On Form1)
.StartDoc
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.MarginBottom = 0
.CurrentX = 0
.CurrentY = 0
For i = 1 To iNumImages
Image.Picture = Scanner.GetImage(i – 1)
.DrawPicture ImageSourceScan.Picture, 0, 0ImageSourceScan.Width, _
ImageSourceScan.Height
If i <> iNumImages Then .NewPage
Next
.EndDoc
.PreviewPage=1
.SaveDoc fqName, False, 1, .PageCount
End With

Second code set to display files created with the SaveDoc method in a VsPrinter control
fqName hold the fully qualified file name (which does exist).

With VSPrinter8 ‘(on Form2)
.KillDoc
.Preview = True
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.MarginBottom = 0
.CurrentX = 0
.CurrentY = 0
.StartDoc
.LoadDoc fqName,True
.EndDoc
.PreviewPage = 1
End With
Preceding display is empty???????


Viewing all articles
Browse latest Browse all 14170

Trending Articles