sdk.vue 18 KB

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