Hi Ali,
Thank you very for your help.
I can load and view multi-page file but I meet another problem.
When I create Annotation on the second page of this file and load it again but it(annotation) always display in the first page.
When I delete annotation in this page and view it again,It isn't deleted.
Can annotation file save multi-page file? And how to load annotation with exact position we create in this file?
My code is here:
//Load file and anntation together
function load()
{
RasterIO1.Load(LEADRasterView1.Raster, "C:/readme.pdf", 0, 0, -1);
RasterAnn.AnnUserMode = 1; var nRet=RasterAnn.AnnLoad("C:/readme.ann",LEADRasterView1.RasterUnk.BitmapListIndex);
}
function Next()
{
LEADRasterView1.RasterUnk.BitmapListIndex= LEADRasterView1.RasterUnk.BitmapListIndex + 1;
var nRet=RasterAnn.AnnLoad("C:/readme.ann", LEADRasterView1.RasterUnk.BitmapListIndex);
}
function Save()
{
var nRet;
var ANN_USERMODE_DESIGN = 1;
var ANN_FMT_NATIVE = 0;
var SAVE_OVERWRITE = 1;
RasterAnn.AnnUserMode = ANN_USERMODE_DESIGN;
//Disable errors so that we can trap our own.
RasterAnn.EnableMethodErrors = false;
//Do nothing if there are no annotations.
if (RasterAnn.AnnContainer == 0)
return;
//Save the all annotations.
nRet = RasterAnn.AnnSave("c:\\readme.ann", ANN_FMT_NATIVE, false, SAVE_OVERWRITE, LEADRasterView1.RasterUnk.BitmapListIndex +1);
}
When I load multi-page file by calling fuction load() and click next page by calling function Next(). Then I draw anntation on this page of file and click Next to move to next page.Then I save this file by calling fuction Save().
I load this file again ,click next to view the second page,there are no annotion in it.
I delete some annotation and save it but it isnot deleted.
Please help me to correct above code.
How to save all annotation and load it as it create?
Please give me an example code load multipage file with anotation on it.
Thanks and best regards,
Hai.