(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3394],{8284:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pdf-to-tiff",function(){return n(3966)}])},3966:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return z}});var s=n(5893),o=n(9008),i=n.n(o),a=n(7294),l=n(2740),c=n(2007),r=n(7239),d=n(9061),p=n(3658),u=n(2125),m=n(5518),g=n(7694),x=n(5135),h=n(9558),f=n(2711),j=n(26),v=n(7984),F=n(5570),S=n(6294),_=n(8495),T=(n(41),n(9072)),y=n(7858),P=n(4154),I=n(386),N=n(3077),D=n(5593),w=n(4996),Z=n(6640),C=n(3115),E=n.n(C),R=n(3260),b=n.n(R),A=n(7311),U=n(5498),k=n(1163);var z=!0;t.default=e=>{let{myData:t}=e;const n=(0,k.useRouter)().asPath,{PDFToTIFFTool:o}=(0,w.Z)(),C=(0,a.useRef)(!1),[R,z]=(0,a.useState)(!1),[M,L]=(0,a.useState)(0),[B,G]=(0,a.useState)(0),[O,q]=(0,a.useState)(),[V,K]=(0,a.useState)({}),[X,Y]=(0,a.useState)(1);const{currentUploadingFile:H,currentUploadedFilesCounter:J,totalUploadingProgress:Q,uploadSpeed:W,uploadTimeLeft:$,resultsInfoVisibility:ee,resultsErrors:te,handleResetInitialUploadState:ne,handleResetCurrentUploadingStatus:se,handleUpdateCurrentUploadingStatus:oe,handleUpdateResultsDisplay:ie}=(0,Z.Z)(),{documents:ae,handleAddDocument:le,handleUpdateDocument:ce,handleResetInitialDocumentsState:re}=(0,N.ZP)(),{pages:de,handleAddPage:pe,handleRemovePageSelection:ue,handleClearPageSelection:me,handlePageSelection:ge,handlePagesSelection:xe,handleResetInitialPagesstate:he}=(0,D.Z)(),fe=e=>{(0,I.eo)(e,G,le,pe,undefined,C,o)},je=async()=>{se();const e=[];de.map(((t,n)=>{!0===t.selected&&e.push(n+1)})),L(3);const t={selectedIndexesArray:e},{uploadResponsesArray:n,uploadResponsesUnseccessfulRequests:s}=await(0,I.IL)({signal:O,documents:ae,handleUpdateCurrentUploadingStatus:oe,uri:o.URI,data:t});L(4);const{downloadResponsesArray:i,downloadResponsesUnseccessfulRequests:a}=await(0,I.GG)({responseMimeType:o.outputFileMimeType,signal:O,uploadResponsesArray:n,handleUpdateDocument:ce}),l=[...s,...a];1===i.length?ie(!0,[]):ie(!1,l),L(5)};(0,a.useEffect)((()=>{C.current=!0;const e=new AbortController,t=e.signal;return q(t),K({container:document.body,getScrollPosition:()=>[document.body.scrollLeft,document.body.scrollTop],throttleTime:0,threshold:0}),()=>{e.abort(),C.current=!1}}),[]),(0,a.useEffect)((()=>{B>0?C.current&&z(!0):C.current&&z(!1)}),[B]),(0,a.useEffect)((()=>{ae.length<=0?L(0):L(1)}),[ae.length]);const ve=(0,s.jsxs)("div",{className:"previewer_content ".concat(b().previewer_content," d-flex flex-wrap ").concat(b().previewer_content_scrollable),children:[!m.tq&&(0,s.jsx)(g.ZP,{dragContainer:".previewer_content",selectableTargets:[".preview"],selectByClick:!1,selectFromInside:!1,toggleContinueSelect:["ctrl"],boundContainer:!1,hitRate:0,ratio:0,onSelectStart:e=>{de.filter((e=>!0===e.selected)).length>0&&!e.inputEvent.ctrlKey&&me()},onSelect:e=>{e.added.forEach((e=>{const t=parseInt(e.getAttribute("data-index"));ge(t)})),e.removed.forEach((t=>{const n=parseInt(t.getAttribute("data-index"));0===e.selected.length?me():ue(n)}))},scrollOptions:V,onScroll:e=>{document.body.scrollBy(10*e.direction[0],10*e.direction[1])}}),de.map(((e,t)=>(0,s.jsx)(h.Z,{page:e,index:t,onSelectionChange:xe},"page-"+e.id)))]});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i(),{children:[(0,s.jsx)("title",{children:t.metaTitle?t.metaTitle:t.title}),(0,s.jsx)("meta",{name:"description",content:t.metaDescription?t.metaDescription:t.shortDescription}),(0,s.jsx)("meta",{name:"Keywords",content:"PDF to TIFF, PDF to TIFF converter, PDF to TIFF online, convert PDF to TIFF, online PDF to TIFF converter, PDF to TIFF conversion, TIFF from PDF, PDF to TIFF tool"}),t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("meta",{property:"og:title",content:t.ogTitle}),(0,s.jsx)("meta",{property:"og:description",content:t.ogDescription}),(0,s.jsx)("meta",{property:"og:image",content:t.ogImage}),(0,s.jsx)("meta",{property:"og:image:alt",content:t.ogImageAlt})]}),(0,s.jsx)("link",{rel:"canonical",href:"".concat(U.G).concat(n)},"canonical")]}),(0,s.jsxs)("main",{children:[(0,s.jsxs)("header",{className:" mb-0",children:[(0,s.jsx)("h1",{className:"text-center text-[##262323] text-[40px] font-[800]",children:null===t||void 0===t?void 0:t.title}),(0,s.jsx)("p",{className:"text-[##6F6767] text-center text-[16px] leading-[22px] font-[400] mt-[16px]",children:null===t||void 0===t?void 0:t.shortDescription})]}),(0,s.jsx)("section",{className:"page_section mt-0",children:(0,s.jsx)("article",{className:"container",children:(0,s.jsxs)("section",{className:E().tool_container_wrapper,children:[0===M&&(0,s.jsx)(y.Z,{handleChange:fe,isSpinnerActive:R,isMultipleInput:!1,acceptedMimeType:o.acceptedInputMimeType}),1===M&&(0,s.jsxs)(_.Z,{title:"Select conversion option",action:()=>{1===X?je():L(2)},actionTitle:"Next page",children:[(0,s.jsxs)(F.Z,{onChange:()=>Y(1),isChecked:1===X,value:"all",icon:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{size:50,color:"#ffa34f"}),(0,s.jsx)(c.Z,{size:30}),(0,s.jsx)(r.Z,{size:50})]}),children:[(0,s.jsx)("span",{className:"".concat(b().pdf_to_image_option_title),children:"CONVERT ALL PAGES"}),(0,s.jsx)("span",{className:"".concat(b().pdf_to_image_option_desc),children:"(Convert all PDF pages to Images)"})]}),(0,s.jsxs)(F.Z,{onChange:()=>Y(2),isChecked:2===X,value:"selected",icon:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{size:50,color:"#ffa34f"}),(0,s.jsx)(c.Z,{size:30}),(0,s.jsx)(d.Z,{size:50,alt:"images"})]}),children:[(0,s.jsx)("span",{className:"".concat(b().pdf_to_image_option_title),children:"CONVERT SELECTED PAGES"}),(0,s.jsx)("span",{className:"".concat(b().pdf_to_image_option_desc),children:"(Select pages to be converted to images)"})]})]}),2===M&&(0,s.jsx)(j.Z,{showTitle:"Select pages to convert",acceptedMimeType:o.acceptedInputMimeType,files:de,enableAddingMoreFiles:!1,filesComponents:ve,handleChange:fe,isSpinnerActive:R,isMultipleInput:!1,isFilesSelectionActive:!0,isPanelTopSticky:!1,isPanelBottomSticky:!0,positionPanelBottomItems:b().spaced,action:()=>{je()},actionTitle:"Start Images Extraction"}),3===M&&(0,s.jsx)(P.Z,{title:"Uploading file ".concat(J," ","of"," ").concat(ae.length),uploadTimeLeft:$,uploadSpeed:W,totalUploadingProgress:Q,currentUploadingFileName:null===H||void 0===H?void 0:H.fileName,currentUploadingFileSize:null===H||void 0===H?void 0:H.file.size}),4===M&&(0,s.jsx)(S.Z,{progress:"Extracting Images"}),5===M&&(0,s.jsxs)(f.Z,{title:"Your image(s) extraction is complete!",handleDownload:()=>{(0,I.wj)(ae)},handleResetInitialState:()=>{re(),ne(),he(),L(0),Y(1)},children:[ee&&(0,s.jsx)("div",{className:"row w-100 d-flex justify-content-center text-center mt-5 mb-5",children:(0,s.jsx)(p.Z,{size:130,color:"#EE1B22"})}),te.length>0&&(0,s.jsx)(x.Z,{alerts:te,type:"error",icon:(0,s.jsx)(u.Z,{size:22})})]})]})})}),(0,s.jsx)(T.Z,{title:null===t||void 0===t?void 0:t.stepDescription,stepsArray:(null===t||void 0===t?void 0:t.Steps)&&t.Steps.map(((e,t)=>({number:t+1,description:e.title})))}),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(v.Z,{title:null===t||void 0===t?void 0:t.featuresTitle,featuresArray:(null===t||void 0===t?void 0:t.Features)&&t.Features.map((e=>({title:e.title,description:e.description,icon:e.icon})))})}),(0,s.jsx)("section",{className:" ",children:(0,s.jsx)("article",{className:"mt-[100px] ",children:(0,s.jsxs)("div",{className:"lg:flex ",children:[(0,s.jsx)("header",{className:"",children:(0,s.jsx)("h4",{className:"text-[#262323] lg:w-[200%] text-[32px] font-[600] tracking-wide",children:null===t||void 0===t?void 0:t.longDescriptionTitle})}),(0,s.jsx)("section",{className:"lg:ml-[220px] text-[16px] font-[400] leading-[24px] lg:mt-0 mt-5 text-[##6F6767]",children:(null===t||void 0===t?void 0:t.longDescription)&&(0,A.ZP)(t.longDescription)})]})})})]})]})}}},function(e){e.O(0,[4577,7311,2657,7943,2396,2080,8186,8720,7418,9278,779,2888,9774,179],(function(){return t=8284,e(e.s=t);var t}));var t=e.O();_N_E=t}]);