IPDFDevice.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. http://www.cgsoso.com/forum-211-1.html
  3. CG搜搜 Unity3d 每日Unity3d插件免费更新 更有VIP资源!
  4. CGSOSO 主打游戏开发,影视设计等CG资源素材。
  5. 插件如若商用,请务必官网购买!
  6. daily assets update for try.
  7. U should buy the asset from home store if u use it in your project!
  8. */
  9. using UnityEngine;
  10. namespace Paroxe.PdfRenderer
  11. {
  12. /// <summary>
  13. /// Interface for device implementation. PDFViewer implements it. It allows to
  14. /// decouple PDFViewer from the API
  15. /// </summary>
  16. public interface IPDFDevice
  17. {
  18. Vector2 GetDevicePageSize(int pageIndex);
  19. void GoToPage(int pageIndex);
  20. PDFDocument GetLoadedDocument();
  21. IPDFDeviceActionHandler BookmarksActionHandler { get; set; }
  22. IPDFDeviceActionHandler LinksActionHandler { get; set; }
  23. bool AllowOpenURL { get; set; }
  24. #if !UNITY_WEBGL
  25. void LoadDocument(PDFDocument document, string password, int pageIndex);
  26. void LoadDocumentFromAsset(PDFAsset pdfAsset, int pageIndex);
  27. void LoadDocumentFromAsset(PDFAsset pdfAsset, string password, int pageIndex);
  28. void LoadDocumentFromResources(string folder, string fileName, string password, int pageIndex);
  29. void LoadDocumentFromStreamingAssets(string folder, string fileName, string password, int pageIndex);
  30. void LoadDocumentFromWeb(string url, string password, int pageIndex);
  31. void LoadDocumentWithBuffer(byte[] buffer, string password, int pageIndex);
  32. void LoadDocumentWithFile(string filePath, string password, int pageIndex);
  33. #endif
  34. }
  35. }