CINXE.COM
Convert PNG to PDF Online - Free - CleverPDF.com
<!DOCTYPE html> <html lang="en"> <head> <base href="https://www.cleverpdf.com:443/"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="x-rim-auto-match" content="none"> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> <meta name="viewport" content="width=device-width,initial-scale=1.0"/> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link rel="shortcut icon" type="image/x-icon" href="/statics/images/favicon.ico"/> <link rel="Bookmark" type="image/x-icon" href="/statics/images/favicon.ico" /> <link rel="icon" type="image/x-icon" href="/statics/images/favicon.ico" /> <link href="/statics/css/metro.css" rel="stylesheet"> <link href="/statics/css/metro-icons.css" rel="stylesheet"> <link href="/statics/css/metro-responsive.css" rel="stylesheet"> <link href="/statics/css/global.css" rel="stylesheet"> <script src="/statics/js/jquery-3.1.0.min.js"></script> <script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="91sz5pnq38emmjo"></script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PZNDVS6');</script> <!-- End Google Tag Manager --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Organization", "name": "CleverPDF", "url": "https://www.cleverpdf.com", "sameAs": [ "https://www.facebook.com/Cleverpdf-464751560559905/", "https://twitter.com/cleverpdf" ] } </script> <title>Convert PNG to PDF Online - Free - CleverPDF.com</title> <meta name="description" content="Convert multiple PNG to a PDF file, just upload the PNG files and download the PDF file in seconds, 100% free of charge. " > <meta property="og:site_name" content="cleverpdf" /> <meta property="og:image" content="https://www.cleverpdf.com/statics/images/og-en/png-to-pdf.jpg" /> <meta property="og:title" content="Convert PNG to PDF Online - Free - CleverPDF.com" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://www.cleverpdf.com/png-to-pdf" /> <meta property="og:description" content="Convert multiple PNG to a PDF file, just upload the PNG files and download the PDF file in seconds, 100% free of charge. " /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@cleverpdf" /> <meta name="twitter:title" content="Convert PNG to PDF Online - Free - CleverPDF.com" /> <meta name="twitter:description" content="Convert multiple PNG to a PDF file, just upload the PNG files and download the PDF file in seconds, 100% free of charge. " /> <meta name="twitter:image" content="https://www.cleverpdf.com/statics/images/og-en/png-to-pdf.jpg" /> <link rel="canonical" href="https://www.cleverpdf.com/png-to-pdf" /> <link rel="alternate" hreflang="en" href="https://www.cleverpdf.com/png-to-pdf" /> <link rel="alternate" hreflang="de" href="https://www.cleverpdf.com/de/png-in-pdf" /> <link rel="alternate" hreflang="fr" href="https://www.cleverpdf.com/fr/convertir-png-en-pdf" /> <link rel="alternate" hreflang="it" href="https://www.cleverpdf.com/it/convertire-png-in-pdf" /> <link rel="alternate" hreflang="pt" href="https://www.cleverpdf.com/pt/png-para-pdf" /> <link rel="alternate" hreflang="es" href="https://www.cleverpdf.com/es/convertir-png-a-pdf" /> <link rel="alternate" hreflang="nl" href="https://www.cleverpdf.com/nl/png-naar-pdf" /> <link rel="alternate" hreflang="pl" href="https://www.cleverpdf.com/pl/png-do-pdf" /> <link rel="alternate" hreflang="sv" href="https://www.cleverpdf.com/sv/png-till-pdf" /> <link rel="alternate" hreflang="zh-Hans" href="https://www.cleverpdf.com/cn/png-to-pdf" /> <link rel="alternate" hreflang="zh-Hant" href="https://www.cleverpdf.com/zh-tw/png-to-pdf" /> <link rel="alternate" hreflang="ja" href="https://www.cleverpdf.com/jp/png-to-pdf" /> <link rel="alternate" hreflang="ru" href="https://www.cleverpdf.com/ru/png-to-pdf" /> <link rel="alternate" hreflang="ko" href="https://www.cleverpdf.com/kr/png-to-pdf" /> <link rel="alternate" hreflang="vi" href="https://www.cleverpdf.com/vi/png-to-pdf" /> <link rel="alternate" hreflang="tr" href="https://www.cleverpdf.com/tr/png-to-pdf" /> <link rel="alternate" hreflang="id" href="https://www.cleverpdf.com/id/png-to-pdf" /> <link rel="alternate" hreflang="hi" href="https://www.cleverpdf.com/hi/png-to-pdf" /> <link rel="alternate" hreflang="th" href="https://www.cleverpdf.com/th/png-to-pdf" /> <link rel="alternate" hreflang="ar" href="https://www.cleverpdf.com/ar/png-to-pdf" /> <link rel="alternate" hreflang="ro" href="https://www.cleverpdf.com/ro/png-to-pdf" /> <link rel="alternate" hreflang="fi" href="https://www.cleverpdf.com/fi/png-to-pdf" /> <link rel="alternate" hreflang="da" href="https://www.cleverpdf.com/da/png-to-pdf" /> <link rel="alternate" hreflang="no" href="https://www.cleverpdf.com/no/png-to-pdf" /> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PZNDVS6" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <link href="/statics/css/function.css" rel="stylesheet"> <script src="/statics/js/metro.js"></script> <style> .function_choosefile_input{ width:100%; text-align: center; } .canvas_container{ display: inline-block; position:relative; width:100%; max-width:600px; clear: both; overflow: hidden; } .function_choosefile{ padding-top:50px; } .canvas_box{ max-width: 120px; width:130px; height: 140px; text-align: center; padding:15px; } .canvas_img_box{ width: 100%; height: 100px; border: solid 1px black; text-align: center; vertical-align: middle; max-width: 100%; max-height:100%; } .canvas_img{ max-width:100%; max-height: 100%; background: #fff; } .canvas_title{ width: 100px; height: 40px; } </style> <div class="content"> <header class="header"> <a href="/" class="header_logo"><img src="/statics/images/logo.svg" alt="CleverPDF Logo"/></a> <div class="header_nav"> <ul class="horizontal-menu"> <li> <p class="dropdown-toggle">Convert PDF</p> <ul class="d-menu" data-role="dropdown"> <li> <a href="/pdf-to-word" class="menu_tWord"><span>PDF to Word</span><i class="ico ico--word"></i></a> </li> <li> <a href="/pdf-to-excel" class="menu_tExcel"><span>PDF to Excel</span><i class="ico ico--excel"></i></a> </li> <li> <a href="/pdf-to-powerpoint" class="menu_tPPTX"><span>PDF to PPTX</span><i class="ico ico--ppt"></i></a> </li> <li> <a href="/pdf-to-images" class="menu_tImages"><span>PDF to Images</span><i class="ico ico--images"></i></a> </li> <li> <a href="/pdf-to-pages" class="menu_tPages"><span>PDF to Pages</span><i class="ico ico--pages"></i></a> </li> <li> <a href="/pdf-to-numbers" class="menu_tNumbers"><span>PDF to Numbers</span><i class="ico ico--numbers"></i></a> </li> <li> <a href="/pdf-to-keynote" class="menu_tKeynote"><span>PDF to Keynote</span><i class="ico ico--keynote"></i></a> </li> <li> <a href="/pdf-to-epub" class="menu_tEpub"><span>PDF to EPUB</span><i class="ico ico--pdf2epub"></i></a> </li> <li> <a href="/pdf-to-jpg" class="menu_tWord"><span>PDF to JPG</span><i class="ico ico--jpg"></i></a> </li> <li> <a href="/pdf-to-png" class="menu_tExcel"><span>PDF to PNG</span><i class="ico ico--png"></i></a> </li> <li> <a href="/pdf-to-tiff" class="menu_tPPTX"><span>PDF to TIF</span><i class="ico ico--tif"></i></a> </li> <li> <a href="/pdf-to-mobi" class="menu_tImages"><span>PDF to Mobi</span><i class="ico ico--mobi"></i></a> </li> </ul> </li> <li> <p class="dropdown-toggle">Create PDF</p> <ul class="d-menu d-menuP" data-role="dropdown"> <li> <a href="/word-to-pdf" class="menu_tWord"><i class="ico ico--word"></i><span>Word to PDF</span></a> </li> <li> <a href="/excel-to-pdf" class="menu_tExcel"><i class="ico ico--excel"></i><span>Excel to PDF</span></a> </li> <li> <a href="/powerpoint-to-pdf" class="menu_tPPTX"><i class="ico ico--ppt"></i><span>PPTX to PDF</span></a> </li> <li> <a href="/images-to-pdf" class="menu_tImages"><i class="ico ico--images2pdf"></i><span>Images to PDF</span></a> </li> <li> <a href="/odt-to-pdf" class="menu_tWord"><i class="ico ico--odt"></i><span>ODT to PDF</span></a> </li> <li> <a href="/epub-to-pdf" class="menu_tExcel"><i class="ico ico--epub2pdf"></i><span>EPUB to PDF</span></a> </li> <li> <a href="/epub-to-mobi" class="menu_tEpubMobi" style="overflow: hidden;"><i class="ico ico--epub2mobi"></i><span>EPUB to Mobi</span></a> </li> <li> <a href="/mobi-to-pdf" class="menu_tImages"><i class="ico ico--mobi2pdf"></i><span>Mobi to PDF</span></a> </li> <li> <a href="/jpg-to-pdf" class="menu_tWord"><i class="ico ico--jpg"></i><span>JPG to PDF</span></a> </li> <li> <a href="/png-to-pdf" class="menu_tExcel"><i class="ico ico--png"></i><span>PNG to PDF</span></a> </li> <li> <a href="/tiff-to-pdf" class="menu_tPPTX"><i class="ico ico--tif"></i><span>TIF to PDF</span></a> </li> <li> <a href="/bmp-to-pdf" class="menu_tImages"><i class="ico ico--bmp"></i><span>BMP to PDF</span></a> </li> </ul> </li> <li> <p class="dropdown-toggle">More PDF Tools</p> <ul class="d-menu d-menuP" data-role="dropdown"> <li> <a href="/encrypt-pdf" class="menu_tEncrypt"><i class="ico ico--encrypt"></i><span>Encrypt PDF</span></a> </li> <li> <a href="/unlock-pdf" class="menu_tUnlock"><i class="ico ico--unlock"></i><span>Unlock PDF</span></a> </li> <li> <a href="/combine-pdf" class="menu_tCombine"><i class="ico ico--combine"></i><span>Combine PDF</span></a> </li> <li> <a href="/split-pdf" class="menu_tSplit"><i class="ico ico--split"></i><span>Split PDF</span></a> </li> <li> <a href="/add-watermark-pdf" class="menu_tWatermark"><i class="ico ico--watermark"></i><span>PDF watermark</span></a> </li> <li> <a href="/rotate-pdf" class="menu_tRotate"><i class="ico ico--rotate"></i><span>Rotate PDF</span></a> </li> <li> <a href="/compress-pdf" class="menu_tCompress"><i class="ico ico--compress"></i><span>Compress PDF</span></a> </li> <li> <a href="/pdf-page-number" class="menu_tEditor"><i class="ico ico--pagenumber"></i><span>Page number</span></a> </li> <li> <a href="/extract-pdf-images" class="menu_tUnlock"><i class="ico ico--extract"></i><span>Extract Images</span></a> </li> <li> <a href="/rearrange-pdf-pages" class="menu_tSplit"><i class="ico ico--reorder"></i><span>Reorder Pages</span></a> </li> <li> <a href="/delete-pdf-pages" class="menu_tRotate"><i class="ico ico--delete"></i><span>Delete Pages</span></a> </li> <li> <a href="/image-format-converter" class="menu_tCompress" style="overflow: hidden;"><i class="ico ico--imageconverter"></i><span>Image Converter</span></a> </li> </ul> </li> </ul> </div> <div class="header_mobile"> <img src="/statics/images/function_menu.png" id="mobileMenu" alt="CleverPDF mobile menu" isclick="0"/> <div class="header_mobile_menu"> <div class="header_mobile_box"> <div class="header_mobile_lists active-container"> <div class="header_mobile_text dropdown-toggle active-toggle">Convert PDF</div> <ul class="header_mobile_list" data-role="dropdown"> <a href="/pdf-to-word"><span>PDF to Word</span></a> <a href="/pdf-to-excel"><span>PDF to Excel</span></a> <a href="/pdf-to-powerpoint"><span>PDF to PPTX</span></a> <a href="/pdf-to-images"><span>PDF to Images</span></a> <a href="/pdf-to-pages"><span>PDF to Pages</span></a> <a href="/pdf-to-numbers"><span>PDF to Numbers</span></a> <a href="/pdf-to-keynote"><span>PDF to Keynote</span></a> <a href="/pdf-to-epub"><span>PDF to EPUB</span></a> <a href="/pdf-to-jpg"><span>PDF to JPG</span></a> <a href="/pdf-to-png"><span>PDF to PNG</span></a> <a href="/pdf-to-tiff"><span>PDF to TIF</span></a> <a href="/pdf-to-mobi"><span>PDF to Mobi</span></a> </ul> </div> </div> <div class="header_mobile_box"> <div class="header_mobile_lists active-container"> <div class="header_mobile_text dropdown-toggle active-toggle">Create PDF</div> <ul class="header_mobile_list" data-role="dropdown"> <a href="/word-to-pdf" class="menu_tWord"><span>Word to PDF</span></a> <a href="/excel-to-pdf" class="menu_tExcel"><span>Excel to PDF</span></a> <a href="/powerpoint-to-pdf" class="menu_tPPTX"><span>PPTX to PDF</span></a> <a href="/images-to-pdf" class="menu_tImages"><span>Images to PDF</span></a> <a href="/odt-to-pdf" class="menu_tWord"><span>ODT to PDF</span></a> <a href="/epub-to-pdf" class="menu_tExcel"><span>EPUB to PDF</span></a> <a href="/epub-to-mobi" class="menu_tPPTX"><span>EPUB to Mobi</span></a> <a href="/mobi-to-pdf" class="menu_tImages"><span>Mobi to PDF</span></a> <a href="/jpg-to-pdf" class="menu_tEditor"><span>JPG to PDF</span></a> <a href="/png-to-pdf" class="menu_tEditor"><span>PNG to PDF</span></a> <a href="/tiff-to-pdf" class="menu_tEditor"><span>TIF to PDF</span></a> </ul> </div> </div> <div class="header_mobile_box"> <div class="header_mobile_lists active-container"> <div class="header_mobile_text dropdown-toggle active-toggle">More PDF Tools</div> <ul class="header_mobile_list" data-role="dropdown"> <a href="/encrypt-pdf" class="menu_tEncrypt"><span>Encrypt PDF</span></a> <a href="/unlock-pdf" class="menu_tUnlock"><span>Unlock PDF</span></a> <a href="/combine-pdf" class="menu_tCombine"><span>Combine PDF</span></a> <a href="/split-pdf" class="menu_tSplit"><span>Split PDF</span></a> <a href="/add-watermark-pdf" class="menu_tWatermark"><span>PDF watermark</span></a> <a href="/rotate-pdf" class="menu_tRotate"><span>Rotate PDF</span></a> <a href="/compress-pdf" class="menu_tCompress"><span>Compress PDF</span></a> <a href="/pdf-page-number" class="menu_tEditor"><span>Page number</span></a> <a href="/extract-pdf-images" class="menu_tEditor"><span>Extract Images</span></a> <a href="/rearrange-pdf-pages" class="menu_tEditor"><span>Reorder Pages</span></a> <a href="/delete-pdf-pages" class="menu_tEditor"><span>Delete Pages</span></a> <a href="/image-format-converter" class="menu_tEditor"><span>Image Converter</span></a> <a href="/png-to-jpg" class="menu_tEditor"><span>PNG to JPG</span></a> <a href="/heic-to-jpg" class="menu_tEditor"><span>HEIC to JPG</span></a> <a href="/tiff-to-jpg" class="menu_tEditor"><span>TIF to JPG</span></a> <a href="/bmp-to-jpg" class="menu_tEditor"><span>BMP to JPG</span></a> <a href="/gif-maker" class="menu_tEditor"><span>GIF Maker</span></a> <a href="/jpg-to-png" class="menu_tEditor"><span>JPG to PNG</span></a> <a href="/gif-to-jpg" class="menu_tEditor"><span>GIF to JPG</span></a> <a href="/gif-to-png" class="menu_tEditor"><span>GIF to PNG</span></a> </ul> </div> </div> </div> </div> <div class="header_language horizontal-menu"> <div class="header_language_select"> <input type="hidden" id="language_select_hidden" value="en"/> <p class="language_select_text dropdown-toggle" id="language_select_text">English</p> <div class="language_select_options" data-role="dropdown" id="language_select_options"> <a href="/png-to-pdf" value="en">English</a> <a href="/de/png-in-pdf" value="de-DE">Deutsch</a> <a href="/fr/convertir-png-en-pdf" value="fr-FR">Français</a> <a href="/it/convertire-png-in-pdf" value="it-IT">Italiano</a> <a href="/pt/png-para-pdf" value="pt-PT">Português</a> <a href="/es/convertir-png-a-pdf" value="es-ES">Español</a> <a href="/ru/png-to-pdf" value="ru-RU">Русский</a> <a href="/sv/png-till-pdf" value="sv-SV">Svenska</a> <a href="/pl/png-do-pdf" value="pl-PL">Polski</a> <a href="/nl/png-naar-pdf" value="nl-NL">Nederlands</a> <a href="/vi/png-to-pdf" value="vi-VI">Tiếng việt</a> <a href="/id/png-to-pdf" value="id-ID">Indonesian</a> <a href="/tr/png-to-pdf" value="tr-TR">Türkçe</a> <a href="/jp/png-to-pdf" value="ja-JP">日本語</a> <a href="/kr/png-to-pdf" value="kr-KR">한국어</a> <a href="/cn/png-to-pdf" value="zh-CN">中文简体</a> <a href="/zh-tw/png-to-pdf" value="zh-TW">中文繁体</a> <a href="/hi/png-to-pdf" value="hi">हिन्दी</a> <a href="/th/png-to-pdf" value="th">ภาษาไทย</a> <a href="/ar/png-to-pdf" value="ar">العربية</a><a href="/ro/png-to-pdf" value="ro">Română</a><a href="/fi/png-to-pdf" value="fi">Suomi</a><a href="/da/png-to-pdf" value="da">Dansk</a><a href="/no/png-to-pdf" value="no">Norsk</a> </div> </div> </div> </header> <script> $(function(){ var path = window.location.pathname; if (path == "/") { path = "/index"; } $(".header_nav").find("a").each(function() { var href = $(this).attr("href"); if (path.indexOf(href) >= 0) { $(".nav").find("a").removeClass("visited"); $(this).addClass("visited"); return false; } }) $(".language_select_options").find("a").click(function(){ var text=$(this).text(); $(".language_select_text").text(text); $(".language_select_options").hide(); }) $(".language_select_icon,.language_select_text").click(function(){ $(".language_select_options").show(); }) $("#mobileMenu").click(function(){ var isclick=$(this).attr("isclick"); if(isclick==0){ $(".header_mobile_menu").css({"min-height":$(window).height()}); $(".header_mobile_menu").show(); $(this).attr("isclick",1); }else{ $(".header_mobile_menu").hide(); $(this).attr("isclick",0); } }) }) </script> <section class="index_content"> <div class="content_header" style="clear: both;overflow: hidden;"> <div class="function_title"> <img src="/statics/images/functionpng2pdf.svg" alt="CleverPDF PNG to PDF converter" style="margin-left:0;"/><h1 class="function_titlepng2pdf" style="margin-left:10px;" id="itp_title">Convert PNG to PDF</h1> <h2 class="function_title_promit" id="itp_promit">Free online PNG to PDF converter</h2> </div> <div class="advertisement_banner"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><!-- product-header --><ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-5488736328646914" data-ad-slot="5523268150"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="function_box" id="choosefile"> <div class="function_choosefile"> <div class="function_choosefile_input"> <div class="canvas_container" id="container"> </div> <div class="input_box openImage" id="chooseInput" style="clear:both;overflow:hidden;height:auto;width:100%;background:#fff;"> <span style="background: #8cc152;margin-bottom: 10px;display:inline-block;top:3px;position: relative;" id="choose_file"> <label for="openPdf">Choose file</label> <input type="file" style="width:210px;left:0;" id="openPdf" accept="jpg,jpeg,png,tiff,bmp,gif,JPEG,JPG,PNG,TIF,BMP,GIF" name="files" multiple="multiple"/> <div class="input_box_ship" style="width:20px;"> <ul> <li><img src="/statics/images/inputShipGoogle_1.png" onclick="loadPicker()" alt="Import from Google Drive"/></li> <li><img src="/statics/images/inputShipDropbox_1.png" alt="Import from Dropbox"/><div id="dropbox-container"></div></li> </ul> </div> </span> <button class="input_box_conversion" id="input_conversion" style="display:none;margin-left: 35px;background: #8cc152;" type="button" onclick="ReallyUpload()">Start conversion</button> </div> </div> <div class="function_choosefile_font" id="itp_choosefile">You can rearrange the order by drag and drop after adding the file.</div> </div> <form id="filesUpload" action='pdf/uploadFiles' method='post' enctype='multipart/form-data'> <input type="hidden" name="files" id="fileUpload" value=""/> </form> <form id="signupListImportForm" class="import-file-form" enctype="multipart/form-data"> <input type="hidden" name="pid" id="PDFID" value="2"/> <input type="hidden" name="oid" value="4"/> <input type="hidden" name="url" value=""/> <input type="hidden" name="index" value=""/> <input type="hidden" name="status" value=""/> <input type="hidden" name="numbers" value=""/> <input type="hidden" name="pwd" value=""/> <input type="hidden" name="formatv1" value="0"/> <input type="hidden" name="formatv2" value="0"/> <input type="hidden" name="formatv3" value="10"/> </form> <div class="flex-grid"> <div class="function_format row flex-just-center function_format_excel"> <div class="function_format_radios cell"> <div class="function_format_title" id="itp_page_size">PDF Page Size</div> <div class="active-container function_format_radios" style="margin-bottom:0;"> <label class="input-control radio function_format_radio"> <input type="radio" name="n1" value="0" checked> <span class="check"></span> <span class="caption" id="itp_top_page">Base on image size</span> </label> <label class="input-control radio function_format_radio"> <input type="radio" name="n1" value="1"> <span class="check"></span> <span class="caption" id="itp_under_page">Custom page size (Max 1280px)</span> </label> </div> <div class="function_format_title format_title_images" id="format_wh" style="display: none;"><span id="itp_widths">Widths:</span><input type="" name="formatWidth" value=""/><span>px</span><span style="margin-left:10px;" id="itp_height">Height:</span><input name="formatHeight" value="" type="text"/>px</div> </div> <div class="cell function_format_output"> <div class="function_format_title" id="itp_right_page">Page Margin:</div> <div class="function_format_title format_title_images" style="margin-top:20px;"><input type="" name="formatMargin" value="10"/><span>(0-256 px)</span></div> </div> </div> </div> </div> <div class="function_box" id="progress_up" style="display: none;"> <div class="function_progress"> <div class="function_progress_img"> <img src="/statics/images/function_progress_img.png" alt="File processing"/> </div> <div class="function_progress_font"id="file_uploading">File Uploading <span id="spanUploadBar">65</span></div> <div class="progress small function_progress_box" data-role="progress" id="spanUploadPercent"></div> </div> </div> <div class="function_box" id="progress_transformation" style="display: none;"> <div class="function_progress"> <div class="function_progress_img"> <img src="/statics/images/function_progress_img1.png" alt="File converting"/> </div> <div class="function_progress_font"id="file_processing"><span id="progress_transformation_num"></span></div> <div class="progress small function_progress_box" id="progress_transformation_bg"> <div class="bar default" style="width: 50%;"></div> </div> </div> </div> <div class="function_box" id="error_box" style="display: none;"> <div class="function_error"> <div class="function_error_password" id="error_password"> <div class="function_error_title"id="combine_error_title">This is an encrypted file</div> <div class="function_error_font"id="unlock_error_title">This file is encrypted by the open password, we can't get access to the content. Please enter the correct open password, and try to convert it again.</div> <div class="function_error_text"><input type="password" id="txtPwd" placeholder="Please enter the password" /> </div> </div> <div class="function_error_password" id="error_bigger"> <div class="function_error_title"id="combine_error_title_two">The selected file is too large.</div> <div class="function_error_font"id="combine_error_title_font_three">Please select a file less than 20 MB. Or purchase CleverPDF for Windows, convert larger files without limitations.</div> <div class="function_error_buttons"><input type="button" class="function_error_button" onclick="conversionAnother()"id="try_another_file" value="Try another file"/><a href="help"id="problem_help">Problem Help</a></div> </div> <div class="function_error_password" id="error_try"> <div class="function_error_title"id="combine_error_title_three">Not a normal file</div> <div class="function_error_font"id="combine_error_title_font_four">This file may be damaged or not a normal PDF file. Please try another PDF.</div> <div class="function_error_buttons"><input type="button" class="function_error_button" onclick="conversionAnother()"id="try_another_file_two" value="Try another file"/><a href="help"id="problem_help_two">Problem Help</a></div> </div> <div class="function_error_password" id="error_format"> <div class="function_error_title"id="combine_error_title_four">Incorrect input format</div> <div class="function_error_font"id="combine_error_title_font_five">The file format you selected is not supported by this feature, please select the correct input format.</div> <div class="function_error_buttons"><input type="button" class="function_error_button" onclick="conversionAnother()"id="try_another_file_three" value="Try another file"/><a href="help"id="problem_help_three">Problem Help</a></div> </div> <div class="function_error_password" id="error_more"> <div class="function_error_title"id="combine_error_title_five">Multiple files not supported</div> <div class="function_error_font"id="combine_error_title_font_severn">Please upload one file only, this feature does not support multiple files.</div> <div class="function_error_buttons"><input type="button" class="function_error_button" onclick="conversionAnother()" id="try_another_file_four"value="Try another file"/><a href="help"id="problem_help_four">Problem Help</a></div> </div> </div> </div> <div class="grid"> <div class="row cells12 function_banner" id="productWin"> <div class=" cell colspan6 function_banner_box"> <div class="img"><a data-fancybox href="https://www.youtube.com/embed/fowcgijOiFc?rel=0" ><img src="/statics/images/win-ads.jpg" alt="CleverPDF Preview thumbnail"/> <p>Watch video</p></a></div> <div class="detail"> <h3 >Desktop version: 24-in-1 CleverPDF for Windows</h3> <span >More productive way for PDF to Word conversion and other 24 PDF tasks. Desktop version doesn't require the Internet Connection, support batch processing and larger files. </span> </div> </div> <div class="function_banner_button cell colspan3"> <a href="https://www.cleverpdf.com/uploadfile/cleverpdf-v300.exe" target="_blank" class="Free">Free Download</a> <a href="https://www.cleverpdf.com/pdf-converter" target="_blank" class="Learn" >Learn More</a> </div> </div> <div class="row cells12 function_banner" id="productMac"> <div class=" cell colspan6 function_banner_box"> <div class="img"><a data-fancybox href="https://www.youtube.com/embed/GEY_1YRDgjA?rel=0" ><img src="/statics/images/function_banner_mac.png" alt="CleverPDF Mac Preview thumbnail"/> <p>Watch video</p></a></div> <div class="detail"> <h3 id="">Desktop version: 20-in-1 CleverPDF for Mac</h3> <span id="">More productive way for PDF to Word conversion and other 20 PDF tasks. Desktop version doesn't require the Internet Connection, support batch processing and larger files. </span> </div> </div> <div class="function_banner_button cell colspan3"> <!--<a href="https://geo.itunes.apple.com/us/app/cleverpdf/id1445515197?mt=12&app=apps"><img src="/statics/images/app-store-dl/dl-mas-en.svg" alt="Download CleverPDF on App Store" height="49" width="172"></a>--><a href="https://www.cleverpdf.com/uploadfile/cleverpdf-v304.dmg" target="_blank" class="Free" id="">Free Download</a> <a href="https://www.cleverpdf.com/pdf-converter-mac" target="_blank" class="Learn" id="">Learn More</a> </div> </div> </div> <div class="grid function_lists"> <div class="row cells2 function_list"> <div class="cell"> <img src="/statics/images/function_list9.svg" alt="CleverPDF feature 9" class="function_list_img"/> <div class="function_list_detail"> <h3 id="png2pdf_left_one">Convert multiple PNG to a single PDF</h3> <span id="png2pdf_left_one_desc">Simply drag and drop PNG files to CleverPDF, arrange the image order by dragging the PNG thumbnails, click the start conversion button, CleverPDF will do the rest and give you the download link in seconds. You can download the PDF file instantly without signing up or leaving any personal information.</span> </div> </div> <div class="cell"> <img src="/statics/images/function_list10.svg" alt="CleverPDF feature 10" class="function_list_img"/> <div class="function_list_detail"> <h3 id="png2pdf_right_two">Why should I convert PNG to PDF?</h3> <span id="png2pdf_right_two_desc">PDF is an open standard for document sharing, viewing and provide the best compatibility. By converting PNG files to PDF, you can easier share or archiving the files. For example, you can send one single PDF instead of multiple PNG files via email.</span> </div> </div> </div> <div class="row cells2 function_list"> <div class="cell"> <img src="/statics/images/function_list3.svg" alt="CleverPDF feature 3" class="function_list_img"/> <div class="function_list_detail"> <h3 id="png2pdf_left_three">Free and safe PNG to PDF Converter</h3> <span id="png2pdf_left_three_desc">You don't need to worry about privacy since no one gets access to your files during the conversion. The files are transferred via the Internet in the secured SSL network. And your files will be erased from the server permanently after processing.</span> </div> </div> <div class="cell"> <img src="/statics/images/function_list4.svg" alt="CleverPDF feature 4" class="function_list_img"/> <div class="function_list_detail"> <h3 id="png2pdf_right_four">Convert PNG to PDF anywhere, any time</h3> <span id="png2pdf_right_four_desc">The online PNG to PDF conversion service is free, it doesn't require any software installation. No matter you are on Mac, Windows, Linux or even the mobile devices, you can merge PNG to PDF within the web browser as long as you have the Internet connection.</span> </div> </div> </div> <div class="row function_list"> <div class="cell"> <img src="/statics/images/function_list_guide.svg" class="function_list_img" alt="CleverPDF How-to Guide"/> <div class="function_list_detail"> <h2 id="guide">How to combine PNG files to single PDF?</h2> <span id=""> <ol> <li>Step 1: Drag and drop PNG files or click on the 'Choose File' button to select the file from your PC.<br/></li> <li>Step 2: Drag the PNG thumbnails to rearrange the order, CleverPDF will produce the PDF according to the given order.<br/></li> <li>Step 3: Customize the output options, you can create PDF base on the original image size or set certain page size. If you want to see a white margin in each page, set the width value of the margin before converting PNG to PDF;<br/></li> <li>step 4: Click on the 'Start Conversion' button, the files will be uploaded. After processing, download the PDF file instantly.<br/></li> </ol> </span> </div> </div> </div> </div> </section> </div> <footer class="footer"> <div class="footer_keep"> <div class="footer_keep_box"> <ul> <li class="font" id="keep_touch">Follow us on</li> <li class="img"><a href="https://www.facebook.com/Cleverpdf-464751560559905/"><img src="/statics/images/keep_1_1.svg" alt="Follow CleverPDF on Facebook"/></a></li> <li class="img"><a href="https://twitter.com/cleverpdf"><img src="/statics/images/keep_2_1.svg" alt="Follow CleverPDF on Twitter"/></a></li> <li class="img"><a href="https://www.youtube.com/channel/UCdBicppgdgMiij_ajin3kMw"><img src="/statics/images/keep_3_1.svg" alt="CleverPDF YouTube Channel"/></a></li> </ul> </div> </div> <div class="footer_print"> <div class="footer_center"> <div class="footer_link"> <a href="/privacy" class="first" id="privacy_terms">Privacy and Terms</a> <a href="/about-us" id="about_ab">About CleverPDF</a> <a href="/help" id="help_guide">Help and guide</a> <a href="/contact" id="con_us">Contact US</a> <a href="/pdf-converter" id="desk_store" >Desktop Software Store</a> </div> <div class="footer_font">Copyright © 2020 CleverPDF. All Rights Reserved</div> </div> </div> <div class="footer_print_mobile"> <div class="footer_link"> <ul> <li><a href="/privacy" class="first" id="privacy_terms_mb">Privacy and Terms</a></li> <li><a href="/about-us" id="about_ab_mb">About CleverPDF</a></li> <li><a href="/help" id="help_guide_mb">Help and guide</a></li> <li><a href="/contact" id="con_us_mb">Contact US</a></li> <li><a href="/pdf-converter" id="desk_store_mb" >Desktop Software Store</a></li> </ul> </div> <div class="footer_font">Copyright © 2020 CleverPDF. All Rights Reserved</div> </div> </footer> <script type="text/javascript" src="statics/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="statics/js/i18n/jquery.json-2.3.min.js"></script> <script type="text/javascript" src="statics/js/i18n/jquery.i18n.properties-1.0.9.js"></script> <link rel="stylesheet" href="/statics/css/jquery.fancybox.min.css" type="text/css" media="screen" /> <script async type="text/javascript" src="/statics/js/jquery.fancybox.min.js"></script><script type="text/javascript" src="https://s.skimresources.com/js/176791X1645789.skimlinks.js"></script> <script> var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = u.indexOf('Mac OS') > -1 ; //ios终端 var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows"); if (isAndroid) { //这个是安卓操作系统 $("#isWindow").show(); $("#productWin").show(); } if (isIOS) { //这个是ios操作系统 $("#isMac").show(); $("#productMac").show(); } if(isWin){ $("#isWindow").show(); $("#productWin").show(); } </script> </body> <script src="/statics/js/upload/jquery.form.js"></script> <script src="/statics/js/upload/cleverpdf.upload.js"></script> <script src="/statics/js/jquery.tips.js"></script> <script src="/statics/js/upload/Sortable.js"></script> <script src="/statics/js/upload/drop.js"></script> <script src="/statics/js/dialog.js"></script> <script type="text/javascript"> $(function () { //傳入的參數,為該 divUploadArea 區塊中,所有 DOM 对象(控件) 的 id 編號,如: divUploadArea1、spanUploadSelect1、WizardWuFileUpload1、... $(this).loadUploadContent(""); //載入第一個上傳區塊 divUploadArea1 所需要的 form 及 jQuery 內容 //$(this).loadUploadContent('2'); //載入第二個上傳區塊 divUploadArea2 所需要的 form 及 jQuery 內容 }); </script> <script src="https://apis.google.com/js/api.js"></script> <script src="/statics/js/storage/google/drivers.js"></script> <script type="text/javascript"> 'use strict'; var byId = function (id) { return document.getElementById(id); } Sortable.create(byId('container'), { group: "words", animation: 150, store: { get: function (sortable) { var order = localStorage.getItem(sortable.options.group); return order ? order.split('|') : []; }, set: function (sortable) { var order = sortable.toArray(); localStorage.setItem(sortable.options.group, order.join('|')); } }, onAdd: function (evt){ }, onUpdate: function (evt){ }, onRemove: function (evt){ }, onStart:function(evt){ }, onSort:function(evt){ }, onEnd: function(evt){ } }); $(document).on({ dragleave: function (e) { //拖离 e.preventDefault(); }, drop: function (e) { //拖后放 e.preventDefault(); }, dragenter: function (e) { //拖进 e.preventDefault(); }, dragover: function (e) { //拖来拖去 e.preventDefault(); } });/* function showPdf(obj) { var container = document.getElementById("container"); container.style.display = "block"; $(".function_choosefile").addClass("function_choosefile_addPadding"); var url = obj; $(".canvas_img").css({"background":"url("+url+") center center no-repeat"}); }*/ function startConversion(){ var formatv1 = $("input[name='formatv1']").val(); var formatv2 = $("input[name='formatv2']").val(); var formatv3 = $("input[name='formatv3']").val(); var pwd=$("#txtPwd").val(); $("[name='pwd']").val(pwd); var format='.pdf'; ajaxConversion('downpng2pdf'); } var bar = $('#spanUploadBar'); //var percent = $('.percent'); //获取显示上传百分比的span var percent = $('#spanUploadPercent'); //var showimg = $('#showimg'); //显示图片的div var showimg = $('#divShowImageAfterUploadSuccess'); //var progress = $(".progress"); //显示进度的div var progress = $("#progress_up"); //var files = $(".files"); //文件上传控件input元素 var filesSuccess = $("#divShowContentAfterUploadSuccess"); //var btn = $(".btn span"); //按钮文本 var btn = $('#spanUploadSelect'); var fileList; var fileBox=[]; var hiddenVal=-1; function fileFnFiles() { var box = document.getElementById("choosefile"); var Ofile = document.getElementById("openPdf"); /*box.addEventListener("drop", Upload, false);*/ Ofile.addEventListener("change", Upload, false); /!*单个文件上传*!/ function Upload(event) { event.preventDefault(); //取消默认浏览器拖拽效果 if (event.type == "drop") { fileList = event.dataTransfer.files; //拖拽获取files } else { fileList = event.target.files; //点击获取files } //检测是否是拖拽文件到页面的操作 var file_type = document.getElementById("openPdf").getAttribute("file_type"); //获取允许上传文件类型 var fileTypes=$("#openPdf").attr("accept").split(","); var arr=[]; for(var i=0;i<fileTypes.length;i++){ var fileType=fileTypes[i]; arr.push(fileType); } var reallyFile; for(var i=0;i<fileList.length;i++){ var FileExt = fileList[i].name.replace(/.+\./, "").toLowerCase(); //正则表达式获取后缀 if($.inArray(FileExt,arr)!=-1){ reallyFile=true; }else{ reallyFile=false; } } if(reallyFile==false){ return; } //检测文件大小 var filesizes=0; var filesize1=0; for (var i=0;i<fileList.length;i++){ var filesize = Math.floor((fileList[i].size) / 1024 / 1024); if (filesize > 20) { //上传文件大小不能超过20M $("#choosefile").hide(); $("#error_box").show(); $(".function_error_password").hide(); $("#error_bigger").show(); return false; } filesize1+=filesize; if (filesize1 > 50) { filesize1-=filesize; openCustomError("Oops, something wrong!","The total size of the selected files is too large, 50MB MAX. Or download CleverPDF for Windows, convert larger files without limitations, completely free!"); $("#openPdf").val(""); fileList=[]; return; } } for (var i = 0; i < fileList.length; i++) { fileBox.push(fileList[i]); } for (var i=0;i<fileBox.length;i++){ if (typeof (fileBox[i])!="undefined"){ var filesize = (fileBox[i].size) / 1024 / 1024; filesizes+=filesize; if (filesizes > 50) { //上传文件大小不能超过50M filesizes-=filesize; openCustomError("Oops, something wrong!","The total size of the selected files is too large, 50MB MAX. Or download CleverPDF for Windows, convert larger files without limitations, completely free!"); $("#openPdf").val(""); fileBox.splice(i, 1); return; } }else{ filesizes+=0; } } var pid=$("[name='pid']").val(); var oid=$("[name='oid']").val(); if(pid==3 && oid==5){ $("#oldFile").text(filesize); } var filepath = $("#openPdf").val(); var arr = new Array(); arr = filepath.split('.'); var ext = "." + arr[1]; var wjName = ""; var html=""; $("#container").show(); for (var i = 0; i < fileList.length; i++) { var wjName=fileList[i].name; var pdffile_url=URL.createObjectURL(fileList[i]); hiddenVal+=1; html+='<div class="canvas_box"><div class="canvas_img_box"><input type="hidden" value="'+hiddenVal+'"/><img class="canvas_img" src="'+pdffile_url+'"/></div><div class="canvas_title">'+wjName+'</div><a class="canvas_delete" index=id><img src="/statics/images/canvas_delete.png" alt="canvas delete"/></a> </div>'; } $("#container").append(html); $(".canvas_box").each(function(){ $(this).mouseenter(function(){ $(this).addClass("canvas_visited"); $(this).children(".canvas_delete").show(); }).mouseleave(function(){ $(this).removeClass("canvas_visited"); $(this).children(".canvas_delete").hide(); }) }) $("#chooseInput").show(); $("#input_conversion").show(); $(".canvas_delete").click(function(){ var index=$(this).siblings(".canvas_img_box").children("input[type='hidden']").val(); $(this).parent().remove() delete fileBox[index]; var id=$(".canvas_img").length; for (var i=0;i<id;i++){ $(".canvas_img").eq(i).attr("id","canvas_img"+(i+1)); } }); } }; function ReallyUpload() { var margin=$("input[name='formatMargin']").val(); var str=/^\\d+$/; if(!/^([1-9]\d*|[0]{1,1})$/.test(margin)){ $("input[name='formatMargin']").tips({ side : 3, msg : "The value you entered is not correct", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; }else if(margin<0 || margin>256){ $("input[name='formatMargin']").tips({ side : 3, msg : "The value you entered is not correct", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; } var Index = $("#PDFID").val(); var fileUpload = $("#openPdf").get(0); var files = fileBox; var nfileBox=[]; var data = new FormData(document.getElementById("filesUpload")); var numbers=""; for(var j=0;j<$(".canvas_img").length;j++){ $(".canvas_img").eq(j).attr("fileindex",(j+1)); var txt=$(".canvas_img").eq(j).siblings("input[type='hidden']").val(); for(var i=0;i<fileBox.length;i++){ if(i==txt){ nfileBox.push(fileBox[i]); } } // } data.append('files', nfileBox[j]); } progress.show(); var Really = ""; $.ajax({ url: "pdf/uploadFiles", type: "POST", data: data, contentType: false, dataType:'text', processData: false, beforeSend: function () { //发送数据之前,执下的代码 showimg.empty(); //清空图片预览区 progress.show(); //显示进度 var percentVal = '0%'; //显示进度百分比 bar.css({"width":percentVal}); //设置进度的宽度,增涨进度 percent.find(".bar").css({"width":percentVal}); bar.html(percentVal); btn.html("uploading..."); //指定显示中 }, xhr: function (event, position, total, percentComplete) { var xhr = $.ajaxSettings.xhr(); if(onprogress && xhr.upload) { xhr.upload.addEventListener("progress" , onprogress, false); return xhr; } }, success: function (data) { //获取服务器端返回的文件数据 //alert('success~'); //兼容ie modify by lifq data = JSON.parse(data); $("#progress_transformation").show(); progress.hide(); if (data.STATUS == "0") { //回傳 1 代表上傳成功,就顯示:預覽圖、刪除超連結 //返回 json 的取值方式 filesSuccess.html("<b>" + data.Name + "</b> <span class='DelImg' id='spanDelImg' relNewName='" + data.NewName + "' relName='" + data.Name + "'>Delete the picture</span>"); //显示:已经上传的文件名、刪除字樣 $("#container").hide(); $("input[name='url']").val(data.url); $("input[name='index']").val(data.index); $("[name='status']").val(data.STATUS); $("#openPdf").val(""); fileBox=[]; nfileBox=[]; hiddenVal=-1; $(".function_choosefile").addClass("function_choosefile_addPadding"); conversionValidate(); } else if (data.STATUS == "-2") { bar.width('0'); //重置进度条(會隱藏進度條) files.html("Upload action stop! Can not upload 0 KB image。"); } else if (data.STATUS == "115") { bar.width('0'); //重置进度条(會隱藏進度條) $("#openPdf").val(""); $("#choosefile").hide(); $(".function_error_password").hide(); $("#error_box").show(); $("#error_try").show(); $("#progress_up").hide(); fileBox=[]; nfileBox=[]; hiddenVal=-1; return; } btn.html("选择文件"); //上傳成功後,按鈕要顯示的新字樣 }, error: function (err) { bar.width('0'); //重置进度条(會隱藏進度條) $("#choosefile").hide(); $("#progress_transformation").hide(); $(".function_error_password").hide(); $("#error_box").show(); $("#error_try").show(); $("#progress_up").hide(); fileBox=[]; nfileBox=[]; hiddenVal=-1; return; } }); }; function onprogress(evt){ var loaded = evt.loaded; //已经上传大小情况 var tot = evt.total; //附件总大小 var percentVal = Math.floor(100*loaded/tot) + '%'; percent.find(".bar").css({"width":percentVal}); bar.html(percentVal); $("#choosefile").hide(); if(percentVal=='100%'){ progress.hide(); $("#progress_transformation").show(); $("#progress_transformation_num").html("Verifying"); } } $(function(){ $("[name='n1']").click(function(){ var val=$(this).val(); if(val==1){ $("#format_wh").show(); }else{ $("#format_wh").hide(); $("input[name='formatv1']").val("0"); $("input[name='formatv2']").val("0"); } }) $("[name='formatWidth']").blur(function(){ var val=$("input[name='formatWidth']").val(); if(val=="" || val==null || !/^([1-9]\d*|[0]{1,1})$/.test(val)){ $("[name='formatWidth']").tips({ side : 3, msg : "Please enter a number between 0-1280", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; }else if(val>1280){ $("[name='formatWidth']").tips({ side : 3, msg : "Please enter a number between 0-1280", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; } $("[name='formatv1']").val($("input[name='formatWidth']").val()); }) $("[name='formatHeight']").blur(function(){ var val=parseInt($("input[name='formatHeight']").val()); if(val=="" || val==null || !/^([1-9]\d*|[0]{1,1})$/.test(val)){ $("[name='formatHeight']").tips({ side : 3, msg : "Please enter a number between 0-1280", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; }else if(val>1280){ $("[name='formatWidth']").tips({ side : 3, msg : "Please enter a number between 0-1280", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; } $("[name='formatv2']").val($("input[name='formatHeight']").val()); }) $("[name='formatMargin']").blur(function(){ var val=parseInt($("input[name='formatMargin']").val()); if(!/^([1-9]\d*|0)$/.test(val)){ $("[name='formatMargin']").tips({ side : 3, msg : "Please enter a number between 0-256", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; }else if(val>256){ $("[name='formatMargin']").tips({ side : 3, msg : "Please enter a number between 0-256", bg : '#f9f9f9', color:'#ef2f61', time : 2 }); return; } $("[name='formatv3']").val($("input[name='formatMargin']").val()); }) loadSubmit(); fileFnFiles(); }) function loadSubmit(){ var pdfIndex = localStorage.getItem('pdfIndex'); var uploadUrl = localStorage.getItem('uploadUrl'); if (pdfIndex != '' && pdfIndex != null && pdfIndex != 'undefined') { localStorage.removeItem('pdfIndex'); localStorage.removeItem('uploadUrl'); var data = new FormData(); data.append('index', pdfIndex); $.ajax({ type: "POST", url: 'pdf/renewFile', data: data, contentType: false, dataType: 'text', processData: false, success: function (data) { var pd = $.parseJSON(data); console.log(pd); $("input[name='url']").val(uploadUrl); $("input[name='index']").val(pd.data.index); $("input[name='pid']").val(pd.data.pid); $("input[name='oid']").val(pd.data.oid); $("input[name='status']").val(pd.data.status); $("input[name='pwd']").val(pd.data.oparas1); if (pd.data.oparas1 != '') { $("#txtPwd").val(pd.data.oparas1); } $("input[name='formatv1']").val(pd.data.oparav1); $("#choosefile").show(); $("#container").hide(); $("#chooseInput").hide(); $("#startConversion").show(); $("#progress_up").hide(); $("#progress_transformation").hide(); progress.hide(); console.log(data); showPdf(uploadUrl); }, error: function (data) { console.log(data.error) } }); } } $(function () { var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = u.indexOf('Mac OS') > -1 ; //ios终端 if (isAndroid) { //这个是安卓操作系统 $("#isWindow").show(); $("#productWin").show(); } if (isIOS) { //这个是ios操作系统 $("#isMac").show(); $("#productMac").show(); } if(isWin){ $("#isWindow").show(); $("#productWin").show(); } $(".input_box_ship").find("li").mouseenter(function(){ var src=$(this).children("img").attr("src").split("_"); $(this).children("img").attr("src",src[0]+"_2.png"); }).mouseleave(function(){ var src=$(this).children("img").attr("src").split("_"); $(this).children("img").attr("src",src[0]+"_1.png"); }) }) </script> <script> function downloadDropbox(files){ if(files.length == 0){ return; } var fileObj = files.pop(); var filesize = Math.floor((fileObj.bytes) / 1024 / 1024); if(filesize>20){ $("#choosefile").hide(); $("#error_box").show(); $(".function_error_password").hide(); $("#error_bigger").show(); return false; } var filesizes = 0; filesizes+=filesize; if(filesizes>50){ filesizes-=filesize; openCustomError("Oops, something wrong!","The total size of the selected files is too large, 50MB MAX. Or download CleverPDF for Windows, convert larger files without limitations, completely free!"); } var url = fileObj.link; var fileName = fileObj.name; if (url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.setRequestHeader("Content-Type", "text/plain; charset=dropbox-cors-hack") xhr.responseType= 'blob' xhr.onload = function() { var blob = xhr.response; var file = new File([blob], fileName); fileBox.push(file); $("#progress_up").hide(); $("#choosefile").show(); downloadDropbox(files); }; xhr.onerror = function() { //alert("Download failure."); }; xhr.send(); } else { alert("Unable to download file."); } } options = { success: function (files) { showimg.empty(); //清空图片预览区 progress.show(); //显示进度 var percentVal = '0%'; //显示进度百分比 bar.css({"width":percentVal}); //设置进度的宽度,增涨进度 percent.find(".bar").css({"width":percentVal}); bar.html(percentVal); btn.html("uploading..."); //指定显示中 $("#choosefile").hide(); var selected = new Array(); $("#container").show(); var html=''; for (var i = 0;i<files.length;i++){ hiddenVal+=1; html+='<div class="canvas_box"><div class="canvas_img_box"><input type="hidden" value="'+hiddenVal+'"/><img class="canvas_img" src="'+files[i].link+'"/></div><div class="canvas_title">'+files[i].name+'</div><a class="canvas_delete" index=id><img src="/statics/images/canvas_delete.png" alt="canvas delete"/></a> </div>'; } $("#container").append(html); downloadDropbox(files); $(".canvas_box").each(function(){ $(this).mouseenter(function(){ $(this).addClass("canvas_visited"); $(this).children(".canvas_delete").show(); }).mouseleave(function(){ $(this).removeClass("canvas_visited"); $(this).children(".canvas_delete").hide(); }) }) $("#chooseInput").show(); $("#input_conversion").show(); $(".canvas_delete").click(function(){ var index=$(this).siblings(".canvas_img_box").children("input[type='hidden']").val(); $(this).parent().remove() delete fileBox[index]; var id=$(".canvas_img").length; for (var i=0;i<id;i++){ $(".canvas_img").eq(i).attr("id","canvas_img"+(i+1)); } }); }, cancel: function () { }, linkType: "direct", // "preview" or "direct" multiselect: true, // true or false extensions: ['.png', '.jpg', '.jpeg','.tiff','.bmp','.gif','.JPEG','.JPG','.PNG','.TIF','.BMP','.GIF'], }; var button = Dropbox.createChooseButton(options); document.getElementById("dropbox-container").appendChild(button); </script> </html>