1"use strict";(self.webpackChunkpdftools_doc=self.webpackChunkpdftools_doc||[]).push([["15322"],{510776(e,t,n){n.r(t),n.d(t,{metadata:()=>i,default:()=>m,frontMatter:()=>d,contentTitle:()=>h,toc:()=>f,assets:()=>p});var i=JSON.parse('{"id":"guides/archive/archive-pdf-tiff","title":"Archive PDF document to TIFF image archive","description":"Learn how to convert a PDF document to an image. The Pdftools SDK supports output files in TIFF, JPEG and PNG image formats. Default conversion profiles are provided that create an output suitable for archiving, digital viewing, and fax. These profiles can be adjusted to suit the specific requirements of the document workflow.","source":"@site/pdf-tools-sdk_versioned_docs/version-1.19/guides/archive/archive-pdf-tiff.mdx","sourceDirName":"guides/archive","slug":"/guides/archive/archive-pdf-tiff","permalink":"/docs/pdf-tools-sdk/1.19/guides/archive/archive-pdf-tiff","draft":false,"unlisted":false,"tags":[{"inline":false,"label":"Pdftools sdk","permalink":"/docs/pdf-tools-sdk/1.19/tags/pdftools-sdk","description":"General documentation and guides for Pdftools SDK PDF processing library."},{"inline":false,"label":"Archive pdfs","permalink":"/docs/pdf-tools-sdk/1.19/tags/archive-pd-fs","description":"Guides on archiving PDF documents using Pdftools SDK."},{"inline":false,"label":"Archive to tiff","permalink":"/docs/pdf-tools-sdk/1.19/tags/archive-to-tiff","description":"Guides on converting PDF documents to TIFF format using Pdftools SDK."}],"version":"1.19","frontMatter":{"title":"Archive PDF document to TIFF image archive","description":"Learn how to convert a PDF document to an image. The Pdftools SDK supports output files in TIFF, JPEG and PNG image formats. Default conversion profiles are provided that create an output suitable for archiving, digital viewing, and fax. These profiles can be adjusted to suit the specific requirements of the document workflow.","keywords":["convert pdf","pdf converter","pdf convert","convert image","convert jpeg","convert png","convert tiff","pdf library","pdf dotnet library","pdf .net library"],"sidebar_label":"Archive PDF to TIFF","tags":["Pdftools SDK","Archive PDFs","Archive to TIFF"]},"sidebar":"toolsSdk","previous":{"title":"Archive image to accessible PDF/A","permalink":"/docs/pdf-tools-sdk/1.19/guides/archive/archive-image-pdfa-accessible"},"next":{"title":"Compress and optimize","permalink":"/docs/pdf-tools-sdk/1.19/guides/optimize/"}}'),o=n(474848),r=n(28453),s=n(327154),a=n.n(s),l=n(729694),c=n.n(l);let d={title:"Archive PDF document to TIFF image archive",description:"Learn how to convert a PDF document to an image. The Pdftools SDK supports output files in TIFF, JPEG and PNG image formats. Default conversion profiles are provided that create an output suitable for archiving, digital viewing, and fax. These profiles can be adjusted to suit the specific requirements of the document workflow.",keywords:["convert pdf","pdf converter","pdf convert","convert image","convert jpeg","convert png","convert tiff","pdf library","pdf dotnet library","pdf .net library"],sidebar_label:"Archive PDF to TIFF",tags:["Pdftools SDK","Archive PDFs","Archive to TIFF"]},h,p={},f=[{value:"1. Initialize the Pdftools SDK license",id:"1-initialize-the-pdftools-sdk-license",level:2},{value:"2. Read the input document",id:"2-read-the-input-document",level:2},{value:"3. Select a conversion profile",id:"3-select-a-conversion-profile",level:2},{value:"4. Adjust the conversion profile",id:"4-adjust-the-conversion-profile",level:2},{value:"5. Convert the document to an image",id:"5-convert-the-document-to-an-image",level:2},{value:"Full example",id:"full-example",level:2}];function u(e){let t={a:"a",admonition:"admonition",code:"code",h2:"h2",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Convert a PDF document into a TIFF image suitable for a specific purpose, such as archiving, digital viewing, or faxing.\nYou can adjust the conversion profile to suit the specific requirements of the document workflow."}),"\n",(0,o.jsx)(t.admonition,{title:"Quick start with a code sample",type:"tip",children:(0,o.jsxs)(t.p,{children:["Get the full sample on GitHub: ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-c/tree/main/Pdf2ImgSimple",children:"C"})}),", ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-csharp/tree/main/Pdf2ImgSimple",children:"C#"})}),", ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-java/tree/main/Pdf2ImgSimple",children:"Java"})}),", ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-python/tree/main/Pdf2ImgSimple",children:"Python"})}),", and ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-vbnet/tree/main/Pdf2ImgSimple",children:"Visual Basic"})}),"."]})}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about PDF to image conversion profiles, see ",(0,o.jsx)(t.a,{href:"/docs/pdf-tools-sdk/1.19/guides/convert/conversion-profiles#pdf-to-image-conversion-profiles",children:"Conversion profiles"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Steps to archive a document"})}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#1-initialize-the-pdftools-sdk-license",children:"Initialize the Pdftools SDK license"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#2-read-the-input-document",children:"Read the input document"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#3-select-a-conversion-profile",children:"Select a conversion profile"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#4-adjust-the-conversion-profile",children:"Adjust the conversion profile"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#5-convert-the-document-to-an-image",children:"Convert the document to an image"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"#full-example",children:"Full example"})}),"\n"]}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsx)(t.h2,{id:"1-initialize-the-pdftools-sdk-license",children:"1. Initialize the Pdftools SDK license"}),"\n",(0,o.jsxs)(t.p,{children:["Before you begin, ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"/docs/licenses/products/pdf-tools-sdk-license/#initialize-the-pdftools-sdk-license",children:"Initialize the Pdftools SDK license"})}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"2-read-the-input-document",children:"2. Read the input document"}),"\n",(0,o.jsxs)(t.p,{children:["First you need to read the PDF document you want to archive. To do this, load the input document from the file system into a (read-only) PDF ",(0,o.jsx)(t.code,{children:"Document"}),".\nThis ",(0,o.jsx)(t.code,{children:"Document"})," can then later be passed to the ",(0,o.jsx)(t.code,{children:"Converter"}),"."]}),"\n",(0,o.jsxs)(a(),{groupId:"programming-languages",children:[(0,o.jsx)(c(),{value:"dotnet",label:".NET",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-csharp",children:"// Open input document\nusing var inStr = File.OpenRead(inPath);\nusing var inDoc = Document.Open(inStr);\n"})})}),(0,o.jsx)(c(),{value:"java",label:"Java",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-java",children:"// Open input document\nFileStream inStr = new FileStream(inPath, FileStream.Mode.READ_ONLY);\ncom.pdftools.pdf.Document inDoc = com.pdftools.pdf.Document.open(inStr);\n"})})})]}),"\n",(0,o.jsx)(t.h2,{id:"3-select-a-conversion-profile",children:"3. Select a conversion profile"}),"\n",(0,o.jsxs)(t.p,{children:["You start the conversion process by creating a conversion ",(0,o.jsx)(t.code,{children:"Profile"})," object.\nThe ",(0,o.jsx)(t.code,{children:"Profile"})," object defines the parameters that are applied to the conversion process."]}),"\n",(0,o.jsxs)(t.p,{children:["This example uses the ",(0,o.jsx)(t.code,{children:"Archive"})," profile, which is intended for document workflows that generate an output for archiving in TIFF image format."]}),"\n",(0,o.jsxs)(a(),{groupId:"programming-languages",children:[(0,o.jsx)(c(),{value:"dotnet",label:".NET",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-csharp",children:"// Create a profile that defines the conversion parameters.\n/
1/ The Archive profile converts PDF documents to TIFF images for archiving.\n\nvar profile = new Profiles.Archive();\n"})})}),(0,o.jsx)(c(),{value:"java",label:"Java",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-java",children:"// Create the profile that defines the conversion parameters.\n// The Archive profile converts PDF documents to TIFF images for archiving.\nArchive profile = new Archive();\n"})})})]}),"\n",(0,o.jsx)(t.h2,{id:"4-adjust-the-conversion-profile",children:"4. Adjust the conversion profile"}),"\n",(0,o.jsxs)(t.p,{children:["The default conversion ",(0,o.jsx)(t.code,{children:"Profile"})," settings are sufficient for most document workflows.\nIf the document workflow has specific requirements (for example, the use of a specific compression algorithm), you can adjust the properties of the conversion ",(0,o.jsx)(t.code,{children:"Profile"})," directly."]}),"\n",(0,o.jsxs)(t.p,{children:["For more information about PDF to image conversion profiles, see ",(0,o.jsx)(t.a,{href:"/docs/pdf-tools-sdk/1.19/guides/convert/conversion-profiles#pdf-to-image-conversion-profiles",children:"Conversion profiles"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"5-convert-the-document-to-an-image",children:"5. Convert the document to an image"}),"\n",(0,o.jsxs)(t.p,{children:["After creating the ",(0,o.jsx)(t.code,{children:"Profile"})," object and adjusting for any workflow-specific properties, the final step is to instantiate a ",(0,o.jsx)(t.code,{children:"Converter"})," object and call its ",(0,o.jsx)(t.code,{children:"ConvertDocument"})," method.\nThe output image file is created at the specified path."]}),"\n",(0,o.jsxs)(a(),{groupId:"programming-languages",children:[(0,o.jsx)(c(),{value:"dotnet",label:".NET",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-csharp",children:"// Create output stream\nusing var outStr = File.Create(outPath);\n\n// Convert the PDF document to an image document\nusing var outDoc = new Converter().ConvertDocument(inDoc, outStr, profile);\n"})})}),(0,o.jsx)(c(),{value:"java",label:"Java",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-java",children:"// Create output stream\nFileStream outStream = new FileStream(outPath, FileStream.Mode.READ_WRITE_NEW);\n\n// Convert the PDF document to an image document\ncom.pdftools.image.Document outDoc = new Converter().convertDocument(inDoc, outStream, profile);\n"})})})]}),"\n",(0,o.jsx)(t.h2,{id:"full-example",children:"Full example"}),"\n",(0,o.jsxs)(t.p,{children:["The code snippets in the previous steps are excerpts that illustrate the workflow. They aren\u2019t complete, runnable programs. Before you run Pdftools SDK, install the package for your language and set up a license key. For setup steps, see ",(0,o.jsx)(t.a,{href:"/docs/pdf-tools-sdk/getting-started/",children:"Getting started with Pdftools SDK"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For a complete, runnable project, clone the sample repository for your language and run the ",(0,o.jsx)(t.code,{children:"Pdf2ImgSimple"})," sample:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-c/tree/main/Pdf2ImgSimple",children:"C"})})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-csharp/tree/main/Pdf2ImgSimple",children:"C#"})})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-java/tree/main/Pdf2ImgSimple",children:"Java"})})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-python/tree/main/Pdf2ImgSimple",children:"Python"})})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://github.com/pdf-tools/sdk-examples-vbnet/tree/main/Pdf2ImgSimple",children:"Visual Basic"})})}),"\n"]})]})}function m(e={}){let{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},617539(e,t,n){n.r(t),n.d(t,{default:()=>i});let i={tabList:"tabList_zI5C",tabItem:"tabItem_yeRP"}},327154(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t=(0,s.default)(),n=(0,c.useTabsContextValue)(e);return o.default.createElement(c.TabsProvider,{value:n,key:String(t)},o.default.createElement(f,{className:e.className},(0,c.sanitizeTabsChildren)(e.children)))};let o=i(n(296540)),r=n(911988),s=i(n(19863)),a=i(n(571508)),l=n(892181),c=n(113042),d=i(n(617539));function h({className:e}){let{selectedValue:t,selectValue:n,tabValues:i,block:r}=(0,c.useTabs)(),s=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.useScrollPositionBlocker)(),f=e=>{let o=e.currentTarget,r=i[s.indexOf(o)].value;r!==t&&(p(o),n(r))},u=e=>{let t=null;switch(e.key){case"Enter":f(e);break;case"ArrowRight":{let n=s.indexOf(e.currentTarget)+1;t=s[n]??s[0];break}case"ArrowLeft":{let n=s.indexOf(e.currentTarget)-1;t=s[n]??s[s.length-1]}}t?.focus()};return o.default.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.default)("tabs",{"tabs--block":r},e)},i.map(({value:e,label:n,attributes:i})=>o.default.createElement("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,key:e,ref:e=>{s.push(e)},onKeyDown:u,onClick:f,...i,className:(0,a.default)("tabs__item",d.default.tabItem,i?.className,{"tabs__item--active":t===e})},n??e)))}function p({children:e}){return o.default.createElement("div",{className:"margin-top--md"},e)}function f({className:e,children:t}){return o.default.createElement("div",{className:(0,a.default)(r.ThemeClassNames.tabs.container,"tabs-container",d.default.tabList)},o.default.createElement(h,{className:e}),o.default.createElement(p,null,t))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.