airwv
03-14-2009, 03:46 PM
Can someone point me in the right direction here. I have an app that opens a .pdf file using pdf plugin, then gets jpg thumbnails and loads them on the same page with thumblist. The thumbnails are pdf pages and I need to load a pdf file as the thumbnail is clicked. I have named the files as example.jpg and the corresponding pdf file a example.pdf. Here is the code I have so far:
PDF.LoadFile("Plugin1", "AutoPlay\\Docs\\Delphi.pdf");
PDF.SetView("Plugin1", "Fit");
--Get all .jpg files from a folder and store them in table "ImageList
ImageList = File.Find("Images", "*.jpg", false, false, nil);
--then add them to the Thumbnail object named "ThumbNails"
result = ThumbList.AddFiles("MyThumblist", ImageList, nil);
ThumbIndex = MyThumbList.GetSelectedItems("ImageList");
--Get Index Item Info
ThumbInfo = MyThumbList.GetItemInfo("ImageList", ThumbIndex[1]);
--Get File Title
FileName= ThumbInfo.filetitle
--Append with .pdf
FileName = FileName..".pdf"
PDF.LoadFile("Plugin1", "AutoPlay\\Docs\\Delphi.pdf");
PDF.SetView("Plugin1", "Fit");
--Get all .jpg files from a folder and store them in table "ImageList
ImageList = File.Find("Images", "*.jpg", false, false, nil);
--then add them to the Thumbnail object named "ThumbNails"
result = ThumbList.AddFiles("MyThumblist", ImageList, nil);
ThumbIndex = MyThumbList.GetSelectedItems("ImageList");
--Get Index Item Info
ThumbInfo = MyThumbList.GetItemInfo("ImageList", ThumbIndex[1]);
--Get File Title
FileName= ThumbInfo.filetitle
--Append with .pdf
FileName = FileName..".pdf"