sdk.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <div class="sdk_nav">
  3. <!-- 头部 -->
  4. <div class="sdk_banner text-center bg-[#232748]">
  5. <h1 class="font-600 text-50px leading-44px pt-114px text-white">为开发者设计的SDK & API解决方案</h1>
  6. <div class="text-30px leading-38px max-w-911px text-[#DBDBDB] mx-auto pt-40px">
  7. 提供给企业的专业PDF解决方案, 支持本地、在线、私有化部署PDF编辑、注释、评论、格式转换、签名、文档对比、标记密文、OCR、测量等功能到所有开发平台中,并且支持跨平台开发。
  8. </div>
  9. <div class="max-w-560px mx-auto mt-72px pb-114px flex">
  10. <div class="dynamic w-260px bg-white text-[#232748] leading-50px rounded-8px text-16px font-500 hover:bg-[#FCD980] cursor-pointer"
  11. @click="handlerApplyUse('trial')">
  12. 免费试用
  13. <span class="dynamic-icon"></span>
  14. </div>
  15. <div class="dynamic ml-40px w-260px border border-2 text-[#FFFFFF] leading-50px rounded-8px text-16px font-500 hover:(bg-[#FCD980] border-[#FCD980] text-[#000]) cursor-pointer"
  16. @click="handlerApplyUse('quote')">
  17. 联系销售
  18. </div>
  19. </div>
  20. </div>
  21. <Platform />
  22. <h3 class="text-[#232748] font-600 text-center my-0 mx-auto lg:(mt-80px text-44px leading-56px max-w-916px) <lg:(mt-52px mb-24px text-20px leading-28px)">
  23. 全面且强大的PDF SDK & API技术,为您创建想要的PDF阅读器&编辑器
  24. </h3>
  25. <Feature class="container-sdk" @open="handlerApplyUse('trial')"></Feature>
  26. <!-- 平台 -->
  27. <div class="bg-[#F7F9FD] pb-80px pt-50px">
  28. <div class="container-sdk flex justify-between flex-wrap">
  29. <div v-for="(item, index) in platformList" :key="index" class="w-[31.5%] flex flex-col justify-between py-32px px-20px rounded-4px bg-[#fff] mt-30px">
  30. <div>
  31. <div class="flex items-center">
  32. <img :src="item.src" :alt="item.title" width="32" height="32">
  33. <div class="ml-12px font-600 text-18px leading-22px text-[#232748]">{{item.title}}</div>
  34. </div>
  35. <div class="sdk_platform mt-16px text-14px leading-20px text-[#232748]" v-html="item.des">
  36. </div>
  37. </div>
  38. <div class="platform_apply flex flex-row-reverse items-center mt-16px text-16px leading-20px text-[#396FFA]" @click="handlerApplyUse('trial')">
  39. <Right class="ml-8px" />
  40. 申请试用
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 代码 -->
  46. <div class="bg-[#F7F9FD]">
  47. <div class="container-sdk py-80px container-plus flex justify-between items-center">
  48. <CodePreviewIndexNew :platform="'Windows'" :devices="devices" :language="language" :languageIndex="languageIndex" :code="codeNew" />
  49. <div class="w-[44%] ml-94px">
  50. <h3 class="text-44px leading-56px text-[#232748] font-600 ">全平台PDF开发工具包</h3>
  51. <TextParagraph class="max-w-500px text-16px leading-28px text-[#52555F] mt-24px mb-32px">
  52. 缩短项目开发时间、快速投入市场,简单代码即可集成我们的PDF库,为您的Windows、Web、Android、iOS、Mac Catalyst、Server、Flutter、Electron等app实现想要的PDF功能。
  53. </TextParagraph>
  54. <div class="platform_apply move-arrow flex items-center text-16px leading-24px text-[#396FFA] font-500" @click="handlerApplyUse('trial')">申请试用<Right class="ml-8px" /></div>
  55. </div>
  56. </div>
  57. </div>
  58. <client-only>
  59. <!-- 弹出框 -->
  60. <el-dialog
  61. :visible.sync="modalViable"
  62. :close-on-press-escape="false"
  63. @close="$refs.sdkForm.doClose()"
  64. :lock-scroll="false"
  65. :append-to-body="true"
  66. top="5vh"
  67. width="742px"
  68. :destroy-on-close="false"
  69. >
  70. <sdk-form ref="sdkForm" :labelText = "labelText"></sdk-form>
  71. </el-dialog>
  72. </client-only>
  73. </div>
  74. </template>
  75. <script>
  76. import sdkForm from '~/components/SdkForm.vue'
  77. import Feature from '~/components/sdk/Feature.vue'
  78. import Platform from '~/components/sdk/Platform.vue'
  79. import Right from '~/assets/images/tools/right.svg?inline'
  80. export default {
  81. components: {
  82. sdkForm,
  83. Platform,
  84. Feature,
  85. Right
  86. },
  87. middleware:'user',
  88. data() {
  89. return {
  90. modalViable: false,
  91. computedH: '',
  92. active: 0,
  93. labelText: '',
  94. language: 'C# WPF',
  95. devices: ['Windows', 'Web', 'Android', 'iOS', 'Mac'],
  96. languageIndex: 0,
  97. codeNew: {
  98. iOS: {
  99. 'Objective-C': [
  100. `<span class="keyword">NSString</span>* pdfPath = <span class="string">@"</span>...<span class="string">"</span>;`,
  101. `<span class="comment">// Initialize a CPDFDocument object with the path to the PDF file</span>`,
  102. `<span class="keyword">NSURL</span>* url = [<span class="keyword">NSURL</span> fileURLWithPath: pdfPath];`,
  103. `CPDFDocument* document = [[[CPDFDocument alloc] initWithURL:url] autorelease];`,
  104. `<br/>`,
  105. `<span class="comment">// Initialize a CPDFView object with the size of the entire screen</span>`,
  106. `CPDFView* pdfView = [[[CPDFView alloc] initWithFrame:self.view.bounds] autorelease];`,
  107. `pdfView.document = document;`
  108. ],
  109. Swift: [
  110. `<span class="comment">// Initialize a CPDFDocument object with the path to the PDF file</span>`,
  111. `<span class="string">let</span> document: CPDFDocument? = CPDFDocument.<span class="string">init</span>(url: filePath)`,
  112. `<br/>`,
  113. `<span class="comment">// Initialize a CPDFView object with the size of the entire screen</span>`,
  114. `<span class="string">let</span> pdfView: CPDFView? = CPDFView.<span class="string">init</span>(frame: <span class="string">self</span>.<span class="title">view</span>.<span class="title">bounds</span>) `,
  115. `pdfView?.<span class="title">document</span> = document`
  116. ]
  117. },
  118. Android: {
  119. Java: [
  120. `<span class="comment">// Get CPDFReaderView from xml</span>`,
  121. `CPDFReaderView readerView <span class="title">=</span> findViewById<span class="title">(</span>R.<span class="title">id</span>.<span class="title">readerview);</span>`,
  122. `CPDFDocument document <span class="title">=</span> <span class="keyword">new</span> CPDFDocument<span class="title">(</span>context<span class="title">);</span>`,
  123. `<br/>`,
  124. `<span class="comment">//Open document.</span>`,
  125. `document.<span class="keyword">open</span><span class="title">(</span>pdfUri<span class="title">);</span>`,
  126. `<br/>`,
  127. `<span class="comment">// Set the PDF document type to CPDFReaderView</span>`,
  128. `readerView.<span class="title">setPDFDocument(</span>document<span class="title">);</span>`
  129. ],
  130. Kotlin: [
  131. `<span class="comment">// Get CPDFReaderView from xml</span>`,
  132. `<span class="keyword">val</span> readerView <span class="title">=</span> findViewById<span class="title">(</span>R.<span class="title">id</span>.<span class="title">readerview)</span>`,
  133. `<span class="keyword">val</span> document <span class="title">=</span> CPDFDocument<span class="title">(</span>context<span class="title">)</span>`,
  134. `<br/>`,
  135. `<span class="comment">//Open document</span>`,
  136. `document.<span class="keyword">open</span><span class="title">(</span>pdfUri<span class="title">)</span>`,
  137. `<br/>`,
  138. `<span class="comment">// Set the PDF document type to CPDFReaderView</span>`,
  139. `readerView.<span class="title">setPDFDocument(</span>document<span class="title">)</span>`
  140. ]
  141. },
  142. Windows: {
  143. 'C# WPF': [
  144. `<span class="string">string</span> filePath <span class="title">=</span> "<span class="title">***</span>"<span class="title">;</span>`,
  145. `<span class="comment">// Initialize a CPDFDocument object with the path to the PDF file</span>`,
  146. `CPDFDocument document = CPDFDocument<span class="title">.</span><span class="keyword">InitWithFilePath</span><span class="title">(</span>filePath<span class="title">);</span>`,
  147. `<br/>`,
  148. `<span class="comment">// Initialize a CPDFViewer object and display it</span>`,
  149. `CPDFViewer pdfViewer <span class="title">= new</span> CPDFViewer<span class="title">();</span>`,
  150. `pdfViewer<span class="title">.</span><span class="keyword">InitDocument</span><span class="title">(</span>document<span class="title">);</span>`,
  151. `pdfViewer<span class="title">.</span><span class="keyword">Load</span><span class="title">();</span>`
  152. ],
  153. 'C# UWP': [
  154. `<span class="string">var</span> localFile <span class="title">= new</span> Uri<span class="title">(</span><span class="statement">"ms-appx:///Assets/***.pdf"</span><span class="title">);</span>`,
  155. `StorageFile file <span class="title">=</span> <span class="string">await</span> StorageFile<span class="title">.</span><span class="string">GetFileFromApplicationUriAsync</span><span class="title">(</span>localFile<span class="title">);</span>`,
  156. `<br/>`,
  157. `<span class="comment">//Open the PDF file and display it in CPDFViewer</span>`,
  158. `CPDFViewer pdfViewer <span class="title">= new</span> CPDFViewer<span class="title">();</span>`,
  159. `pdfViewer<span class="title">.</span><span class="string">OpenFile</span><span class="title">(</span>file<span class="title">);</span>`
  160. ]
  161. },
  162. Mac: {
  163. 'Objective-C': [
  164. `<span class="keyword">NSString</span>* pdfPath = <span class="string">@"</span>...<span class="string">"</span>;`,
  165. `<span class="comment">// Initialize a CPDFDocument object with the path to the PDF file</span>`,
  166. `<span class="keyword">NSURL</span>* url = [<span class="keyword">NSURL</span> fileURLWithPath: pdfPath];`,
  167. `CPDFDocument* document = [[[CPDFDocument alloc] initWithURL:url] autorelease];`,
  168. `<br/>`,
  169. `<span class="comment">// Initialize a CPDFView object with the size of the entire screen</span>`,
  170. `CPDFView* pdfView = [[[CPDFView alloc] initWithFrame:self.view.bounds] autorelease];`,
  171. `pdfView.document = document;`
  172. ],
  173. Swift: [
  174. `<span class="comment">// Initialize a CPDFDocument object with the path to the PDF file</span>`,
  175. `<span class="string">let</span> document: CPDFDocument? = CPDFDocument.<span class="string">init</span>(url: filePath)`,
  176. `<br/>`,
  177. `<span class="comment">// Initialize a CPDFView object with the size of the entire screen</span>`,
  178. `<span class="string">let</span> pdfView: CPDFView? = CPDFView.<span class="string">init</span>(frame: <span class="string">self</span>.<span class="title">view</span>.<span class="title">bounds</span>) `,
  179. `pdfView?.<span class="title">document</span> = document`
  180. ]
  181. },
  182. Web: {
  183. JavaScript: [
  184. `<span class="keyword">import</span> CPDF from <span class="string">'/@cpdf/webviewer'</span>;`,
  185. `<br/>`,
  186. `<span class="keyword">const</span> viewer = document.getElementById(<span class="string">'webviewer'</span>);`,
  187. `<span class="comment">// Initialize CPDF Web viewer and load your pdf</span>`,
  188. `CPDF.init({`,
  189. ` pdfUrl: <span class="string">'Your PDF Url'</span>,`,
  190. `}, viewer)`,
  191. `.then((core) => {`,
  192. ` <span class="keyword">const</span> docViewer = core.docViewer;`,
  193. `})`
  194. ]
  195. }
  196. },
  197. platformList :[
  198. {
  199. src: require('~/assets/images/tools/windows.svg'),
  200. title: 'Windows PDF编辑SDK',
  201. des: '提供专业的<span style="font-weight: 600; color: #396FFA">C#</span>、<span style="font-weight: 600; color: #396FFA">VB</span>和<span style="font-weight: 600; color: #396FFA">C++</span> SDK库,让您轻松快速地将PDF基础功能和高阶功能集成到Windows应用程序中,包含所有PDF功能和高阶功能,比如文本编辑、图片编辑、PDF转Office/图片、数字签名、OCR、文档对比、密文标记等。独立的PDF技术,无需依赖Adobe Acrobat。'
  202. },
  203. {
  204. src: require('~/assets/images/tools/web.svg'),
  205. title: 'Web PDF阅读SDK',
  206. des: '提供专业的<span style="font-weight: 600; color: #396FFA">JavaScript</span> PDF SDK,加速您Web应用程序开发,允许您的网页用户在任何设备上打开、阅读、标注、填写、签署、对比PDF文件等。支持所有的浏览器(Chrome, Edge, Firefox, Safari等)和主流的Web框架(Electron, Vue, Nuxt, React, Next, Svelte, Angular, ionic angular等)。'
  207. },
  208. {
  209. src: require('~/assets/images/tools/android.svg'),
  210. title: 'Android PDF SDK',
  211. des: '集成我们的<span style="font-weight: 600; color: #396FFA">Kotlin</span>和<span style="font-weight: 600; color: #396FFA">Java</span>库,简单地将PDF功能集成到您安卓应用程序中,为您的app用户提供PDF阅读、编辑、注释、填写表单,签名等基础功能,和文档编辑、格式转换、OCR等高级功能。'
  212. },
  213. {
  214. src: require('~/assets/images/tools/ios.svg'),
  215. title: 'iOS PDF编辑SDK',
  216. des: '使用专业的<span style="font-weight: 600; color: #396FFA">Objective-C</span>和<span style="font-weight: 600; color: #396FFA">Swift</span> PDF SDK,帮助您轻松开发iOS PDF阅读器&编辑器,允许阅读PDF、编辑、注释、填写表单、签名、和格式转换等。'
  217. },
  218. {
  219. src: require('~/assets/images/tools/mac.svg'),
  220. title: 'Mac Catalyst PDF编辑SDK',
  221. des: '为Mac Catalyst平台提供<span style="font-weight: 600; color: #396FFA">Swift</span>和<span style="font-weight: 600; color: #396FFA">Objective-C</span>库开发全面的PDF功能,与iOS应用程序共享相同的代码库,降低维护成本。为您的app用户提供全面的、专业的PDF处理功能。'
  222. },
  223. {
  224. src: require('~/assets/images/tools/electron.svg'),
  225. title: 'Electron PDF SDK',
  226. des: '综合的<span style="font-weight: 600; color: #396FFA">JavaScript</span> PDF处理库,支持在Electron平台上提供跨Cloud, Windows, Mac, Linux, 和Chromebook的PDF开发体验。支持为Electron app实现所有你能想到的处理PDF的功能,并利用Electron的桌面特性进行自定义。'
  227. },
  228. {
  229. src: require('~/assets/images/tools/flutter.svg'),
  230. title: 'Flutter PDF SDK',
  231. des: '使用专业的<span style="font-weight: 600; color: #396FFA">Flutter</span>库,将PDF功能集成到您的iOS和Android应用程序中,享受Flutter灵活的开发体验、高性能、和美观的界面,实现PDF的预览、编辑、签名、密文标记、注释等功能'
  232. },
  233. {
  234. src: require('~/assets/images/tools/server.svg'),
  235. title: 'Server端PDF转档、编辑SDK',
  236. des: '为Server平台提供可靠的<span style="font-weight: 600; color: #396FFA">Java</span>,<span style="font-weight: 600; color: #396FFA">.NET Core</span>,和命令行工具等解决方案处理PDF文件,支持多线程和分布式环境。在Server应用程序中实现PDF的生成、查看、编辑、版本对比、OCR、转档等功能'
  237. },
  238. {
  239. src: require('~/assets/images/tools/api.svg'),
  240. title: 'PDF API',
  241. des: '专业的<span style="font-weight: 600; color: #396FFA">HTTP API</span>可以让您轻松快速地将PDF功能集成到所有开发平台的应用程序中,无需担心编程语言与API是否兼容的问题。支持远程调用和私有化部署。'
  242. }
  243. ]
  244. }
  245. },
  246. head() {
  247. return {
  248. title: 'PDF SDK/API解决方案: 全面PDF功能、全平台、跨平台集成',
  249. meta: [
  250. {
  251. name: 'keywords',
  252. hid: 'keywords',
  253. content: 'PDF SDK, PDF Library, pdf开发包, PDF Kit, PDF解决方案'
  254. },
  255. {
  256. hid: 'description',
  257. name: 'description',
  258. content: '17PDF Reader提供全平台、跨平台整合PDF阅读器核心功能到你的App中, 支持文件阅读、注释、扫描、数字签名、加密、OCR、文本编辑、表单填写、文件合并、文件分割等各种功能集成,让你的工具更强大!'
  259. },
  260. ]
  261. }
  262. },
  263. methods: {
  264. handlerApplyUse(labelText) {
  265. this.labelText = labelText
  266. this.modalViable = true
  267. }
  268. },
  269. }
  270. </script>
  271. <style lang="scss" scoped>
  272. .sdk_nav {
  273. font-family: PingFang SC;
  274. .sdk_banner {
  275. background: url('~/assets/images/sdk/banner.png') center no-repeat;
  276. background-size: cover;
  277. }
  278. .sdk_platform {
  279. font-family: Poppins;
  280. }
  281. .platform_apply {
  282. cursor: pointer;
  283. svg {
  284. transition: all 0.25s ease-out;
  285. }
  286. &:hover svg {
  287. transform: translateX(8px);
  288. }
  289. }
  290. }
  291. @import '@/assets/mixins.scss';
  292. .container {
  293. width: 100%;
  294. margin-right: auto;
  295. margin-left: auto;
  296. padding-left: 20px;
  297. padding-right: 20px;
  298. }
  299. @media (min-width: 930px) {
  300. .container {
  301. max-width: 930px;
  302. min-width: 900px;
  303. }
  304. }
  305. @media (min-width: 1280px) {
  306. .container {
  307. max-width: 1200px;
  308. }
  309. }
  310. .dynamic {
  311. .dynamic-icon {
  312. position: relative;
  313. width: 16px;
  314. height: 16px;
  315. margin-left: 8px;
  316. &::after,
  317. &::before {
  318. position: absolute;
  319. transition: all 0.25s ease-out;
  320. box-sizing: border-box;
  321. border-top: 2px solid #232748;
  322. }
  323. &::before {
  324. content: '';
  325. width: 8px;
  326. height: 8px;
  327. border-left: 2px solid #232748;
  328. right: -15px;
  329. top: 50%;
  330. transform: translateY(-50%) rotate(135deg);
  331. }
  332. &::after {
  333. content: '';
  334. width: 11px;
  335. height: 2px;
  336. left: -1px;
  337. top: 50%;
  338. transform: translateY(-50%) rotate(-65deg);
  339. }
  340. }
  341. &:hover {
  342. .dynamic-icon {
  343. &::after {
  344. transform: translateY(-50%);
  345. left: 0px;
  346. }
  347. }
  348. }
  349. }
  350. </style>