initialPdfState.ts 804 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import {
  2. ProgressType,
  3. ViewportType,
  4. AnnotationType,
  5. WatermarkType,
  6. } from '../constants/type';
  7. export type StateType = {
  8. totalPage: number;
  9. currentPage: number;
  10. pdf: any;
  11. progress: ProgressType;
  12. viewport: ViewportType;
  13. scale: number;
  14. rotation: number;
  15. annotations: AnnotationType[];
  16. isInit: boolean;
  17. watermark: WatermarkType;
  18. };
  19. export default {
  20. totalPage: 1,
  21. currentPage: 1,
  22. pdf: null,
  23. progress: {
  24. loaded: 0,
  25. total: 1,
  26. },
  27. viewport: {},
  28. scale: 1,
  29. rotation: 0,
  30. annotations: [],
  31. isInit: false,
  32. watermark: {
  33. type: 'text',
  34. textcolor: '#c0c0c0',
  35. opacity: 0.3,
  36. text: '',
  37. scale: 2,
  38. rotation: 45,
  39. vertalign: 'center',
  40. horizalign: 'center',
  41. xoffset: 0,
  42. yoffset: 0,
  43. imagepath: '',
  44. isfront: 'yes',
  45. },
  46. };