{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Export to PDF","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"export-to-pdf","__idx":0},"children":["Export to PDF"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial outlines how to create a PDF export of the WellLog widget. The method exportToPdf simplifies the PDF format export in the web browser of the visible or scrollable limits of the widget. Data must be loaded to memory before export."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition, the exported document can have a page footer and header and a document footer and header (head and tail). By default, page and document footers and headers are not specified. Head and tail can be described in a declarative way using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/report"]}," library in the XML-based document, or if necessary, create a custom header using GeoToolkit shapes directly. In this tutorial, all options are demonstrated, beginning with exporting without headers."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-without-headers-and-footers","__idx":1},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#exportPDF"},"children":["#"]}," Export to PDF without headers and footers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example exports whole limits of the tracks to PDF without headers and footers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The example fits all tracks to the page width using the scaling option and exports in continuous mode. The user has the option to select a customs track scale in PDF or preserve the same scale as on-screen. Also, the user can change the exported file name in the Save As option by entering the preferred file name."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { ExportToPdf } from \"/src/code/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf.ts\";\nfunction createScene(canvas) {\n  return new ExportToPdf(canvas, false);\n}\nexport { createScene };\n\ncreateScene(document.querySelector('[ref=\"plot\"]'));\n\n","lang":"ts"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"css","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"css","header":{"controls":{"copy":{}}},"source":"\n.cg-tooltip-holder {\n  position: relative;\n}\n\n.cg-tooltip {\n  position: absolute;\n  display: block;\n  padding: 2px 12px 3px 7px;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  background: white !important;\n  opacity: 0.9;\n  color: #333333;\n  border: solid 1px gray;\n  border-radius: 5px;\n  text-align: left;\n  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n  border-radius: 5px;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n}\n/* Default setting for tooltip */\n.cg-tooltip-container {\n  position: absolute;\n  display: block;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  padding: 3px 7px;\n  background: #f7f7f7;\n  color: #333333;\n  border: 1px solid #938e8e;\n  opacity: 0.8;\n  text-align: left;\n  box-shadow: 3px 3px 10px #888;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n  user-select: none;\n}\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n  .cg-tooltip-container {\n    border-radius: 0;\n  }\n}\n/* Default left arrow for tooltip */\n.cg-tooltip-arrow-left::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-left: 0;\n  border-right: 5px solid  #938e8e;\n  transform: translate(calc(-100%), -50%);\n}\n.cg-tooltip-arrow-left::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-left: 0;\n  border-right: 4px solid #f7f7f7;\n  transform: translate(calc(-100%), -50%);\n}\n/* Default top arrow for tooltip */\n.cg-tooltip-arrow-top::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 5px solid transparent;\n  border-top: 0;\n  border-bottom: 5px solid #938e8e;\n  transform: translate(-50%, -100%);\n}\n.cg-tooltip-arrow-top::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 4px solid transparent;\n  border-top: 0;\n  border-bottom: 4px solid #f7f7f7;\n  transform: translate(-50%, -100%);\n}\n/* Default right arrow for tooltip */\n.cg-tooltip-arrow-right::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-right: 0;\n  border-left: 5px solid #938e8e;\n  transform: translate(100%, -50%);\n}\n.cg-tooltip-arrow-right::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-right: 0;\n  border-left: 4px solid #f7f7f7;\n  transform: translate(100%, -50%);\n}\n/* Default bottom arrow for tooltip */\n.cg-tooltip-arrow-bottom::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0px;\n  border: 5px solid transparent;\n  border-bottom: 0;\n  border-top: 5px solid #938e8e;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n.cg-tooltip-arrow-bottom::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0;\n  border: 4px solid transparent;\n  border-bottom: 0;\n  border-top: 4px solid #f7f7f7;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n/* Tooltip item name */\n/* Tooltip item value */\n/* .cg-tooltip-item-value */\n/* Tooltip item value */\n.cg-tooltip-item-unit {\n  text-transform: none;\n}\n\n.cg-tooltip-item-name {\n    text-transform: capitalize;\n    white-space: nowrap;\n    vertical-align: middle;\n    font-size: 13px;\n}\n.cg-tooltip-row {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  white-space: pre-wrap;\n  font-size: 12px;\n  line-height: 100%;\n  margin: 1px 0;\n}\n.cg-tooltip-title {\n  font-size: 13px;\n  height: 14px;\n  text-transform: capitalize;\n}\n.cg-tooltip-title .cg-tooltip-symbol {\n  margin-right: 0 !important;\n}\n.cg-tooltip-title-name {\n  vertical-align: middle;\n}\n.cg-tooltip-row + .cg-tooltip-row {\n  margin-top: 4px;\n}\n.cg-tooltip-row.cg-tooltip-title + .cg-tooltip-row {\n  margin-top: 5px;\n}\n.cg-tooltip-item-value + .cg-tooltip-item-unit {\n    margin-left: 1px;\n}\n/* Tooltip symbol */\n.cg-tooltip-symbol-cell {\n  display: inline-flex;\n  min-width: 13px; /* 10px size + 3px margin */\n}\n.cg-tooltip-symbol {\n  margin-right: 3px;\n  background-color: transparent;\n  display: block;\n}\n.cg-tooltip-symbol > img {\n  display: block;\n}\n.cg-tooltip-list-cell {\n  display: inline-flex;\n}\n.cg-tooltip-list-symbol {\n  display: block;\n  margin-right: 3px;\n  width: 6px;\n  height: 6px;\n  vertical-align: middle;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n.cg-tooltip-symbol-legacy {\n  border-radius: 4px;\n  margin-right: 5px;\n  height: 8px;\n  width: 8px;\n  display: inline-block;\n}\n.cg-tooltip-title-legacy {\n  font-weight: 900;\n}\n\n/* Tooltip symbol circle */\n.cg-tooltip-symbol.circle {\n  height: 10px;\n  width: 10px;\n  display: inline-block;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n/* Tooltip symbol line */\n.cg-tooltip-symbol.line {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: scale(1.2, 0.2);\n}\n/* Tooltip symbol diamond */\n.cg-tooltip-symbol.diamond {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: rotate(45deg);\n    border-radius: 0px;\n}\n/* Tooltip symbol square */\n.cg-tooltip-symbol.square {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    border-radius: 0px;\n    border: 1px solid rgba(0,0,0,.4);\n}\n\n","lang":"css"},"children":[]}]}]},{"$$mdtype":"Tag","name":"iframe","attributes":{"src":"https://dc2-documentation.s3.amazonaws.com/documentation/slb-docs-test/5.0/examples/vue/tutorials/index.html#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf?section=exportPDF&extract=true","width":"100%","height":"689.5px","style":{"border":"none"}},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-with-custom-document-header-and-footer","__idx":2},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#custom"},"children":["#"]}," Export to PDF with Custom Document Header and Footer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section of the tutorial exports whole limits of the tracks to PDF and uses a custom document header and footer component. The position of each element is defined as relative coordinates of the header and footer. The header and footer use a simple parser to create shapes from a JSON-based definition of the elements."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-with-custom-page-header-and-footer","__idx":3},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#custompage"},"children":["#"]}," Export to PDF with Custom Page Header and Footer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to document headers and footers, each page of the PDF can also contain a header and footer. The example below uses the same WellLogWidget as the previous examples with the page headers and footers included. Note that you need to disable continuous mode."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-using-templates","__idx":4},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#template"},"children":["#"]}," Export to PDF Using Templates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To simplify creation of complex reports, GeoToolkit provides a small library ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/report"]}," to describe, parse, and represent the document footer and header in declarative form using an XML-based format. These documents follow XML schema [schema.xsd]. The following code demonstrates loading templates using AJAX. These XML templates are processed with the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://underscorejs.org/"},"children":["Underscore.js"]}," library to create an XML document from the provided templates. This library uses JSON objects to represent a model of parameters such as company name. Prepared documents are then parsed with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/report"]}," to be represented with document headers and footers. To see a new report, click the toolbar Print icon."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-using-templates-with-page-breaks","__idx":5},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#pagebreaks"},"children":["#"]}," Export to PDF Using Templates with Page Breaks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section shows how to modify templates to support page breaks.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"To set a page break you need to specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["style=\"page-break:before|after\""]}," attribute or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page-break=\"before|after\""]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-with-welllog-page-header","__idx":6},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#wellLogHeader"},"children":["#"]}," Export to PDF with WellLog Page Header"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section shows how to create an example of page header, which display WellLog Header on page. Code below shows how to initialize ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WellLogHeaderComponent"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Close"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-with-custom-font","__idx":7},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#exportPDFCustom"},"children":["#"]}," Export to PDF with Custom Font"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section of the tutorial exports whole limits of the tracks to PDF and uses a custom font to display the header's text. TrueType fonts could be embedded into the PDF document for the correct viewing of the document on all devices. This example has an embedded font in embededfonts.js file. To use another font, convert the font to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.giftofspeed.com/base64-encoder/"},"children":["base64 format"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { CustomExportToPDF } from \"/src/code/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf.ts\";\nfunction createScene(canvas) {\n  return new CustomExportToPDF(canvas, false);\n}\nexport { createScene };\n\ncreateScene(document.querySelector('[ref=\"plot\"]'));\n\n","lang":"ts"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"css","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"css","header":{"controls":{"copy":{}}},"source":"\n.cg-tooltip-holder {\n  position: relative;\n}\n\n.cg-tooltip {\n  position: absolute;\n  display: block;\n  padding: 2px 12px 3px 7px;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  background: white !important;\n  opacity: 0.9;\n  color: #333333;\n  border: solid 1px gray;\n  border-radius: 5px;\n  text-align: left;\n  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n  border-radius: 5px;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n}\n/* Default setting for tooltip */\n.cg-tooltip-container {\n  position: absolute;\n  display: block;\n  overflow: visible !important;\n  font-family: Roboto, Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  padding: 3px 7px;\n  background: #f7f7f7;\n  color: #333333;\n  border: 1px solid #938e8e;\n  opacity: 0.8;\n  text-align: left;\n  box-shadow: 3px 3px 10px #888;\n  margin: 0 !important;\n  z-index: 10000;\n  max-width: 400px;\n  text-wrap: normal !important;\n  white-space: normal !important;\n  user-select: none;\n}\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n  .cg-tooltip-container {\n    border-radius: 0;\n  }\n}\n/* Default left arrow for tooltip */\n.cg-tooltip-arrow-left::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-left: 0;\n  border-right: 5px solid  #938e8e;\n  transform: translate(calc(-100%), -50%);\n}\n.cg-tooltip-arrow-left::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-left: 0;\n  border-right: 4px solid #f7f7f7;\n  transform: translate(calc(-100%), -50%);\n}\n/* Default top arrow for tooltip */\n.cg-tooltip-arrow-top::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 5px solid transparent;\n  border-top: 0;\n  border-bottom: 5px solid #938e8e;\n  transform: translate(-50%, -100%);\n}\n.cg-tooltip-arrow-top::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  top: 0;\n  border: 4px solid transparent;\n  border-top: 0;\n  border-bottom: 4px solid #f7f7f7;\n  transform: translate(-50%, -100%);\n}\n/* Default right arrow for tooltip */\n.cg-tooltip-arrow-right::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 5px solid transparent;\n  border-right: 0;\n  border-left: 5px solid #938e8e;\n  transform: translate(100%, -50%);\n}\n.cg-tooltip-arrow-right::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  right: 0;\n  top: 50%;\n  border: 4px solid transparent;\n  border-right: 0;\n  border-left: 4px solid #f7f7f7;\n  transform: translate(100%, -50%);\n}\n/* Default bottom arrow for tooltip */\n.cg-tooltip-arrow-bottom::before {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0px;\n  border: 5px solid transparent;\n  border-bottom: 0;\n  border-top: 5px solid #938e8e;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n.cg-tooltip-arrow-bottom::after {\n  content: '';\n  position: absolute;\n  display: block;\n  width: 0px;\n  left: 50%;\n  bottom: 0;\n  border: 4px solid transparent;\n  border-bottom: 0;\n  border-top: 4px solid #f7f7f7;\n  transform: translate(-50%, 100%);\n  z-index: 10000;\n}\n/* Tooltip item name */\n/* Tooltip item value */\n/* .cg-tooltip-item-value */\n/* Tooltip item value */\n.cg-tooltip-item-unit {\n  text-transform: none;\n}\n\n.cg-tooltip-item-name {\n    text-transform: capitalize;\n    white-space: nowrap;\n    vertical-align: middle;\n    font-size: 13px;\n}\n.cg-tooltip-row {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  white-space: pre-wrap;\n  font-size: 12px;\n  line-height: 100%;\n  margin: 1px 0;\n}\n.cg-tooltip-title {\n  font-size: 13px;\n  height: 14px;\n  text-transform: capitalize;\n}\n.cg-tooltip-title .cg-tooltip-symbol {\n  margin-right: 0 !important;\n}\n.cg-tooltip-title-name {\n  vertical-align: middle;\n}\n.cg-tooltip-row + .cg-tooltip-row {\n  margin-top: 4px;\n}\n.cg-tooltip-row.cg-tooltip-title + .cg-tooltip-row {\n  margin-top: 5px;\n}\n.cg-tooltip-item-value + .cg-tooltip-item-unit {\n    margin-left: 1px;\n}\n/* Tooltip symbol */\n.cg-tooltip-symbol-cell {\n  display: inline-flex;\n  min-width: 13px; /* 10px size + 3px margin */\n}\n.cg-tooltip-symbol {\n  margin-right: 3px;\n  background-color: transparent;\n  display: block;\n}\n.cg-tooltip-symbol > img {\n  display: block;\n}\n.cg-tooltip-list-cell {\n  display: inline-flex;\n}\n.cg-tooltip-list-symbol {\n  display: block;\n  margin-right: 3px;\n  width: 6px;\n  height: 6px;\n  vertical-align: middle;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n.cg-tooltip-symbol-legacy {\n  border-radius: 4px;\n  margin-right: 5px;\n  height: 8px;\n  width: 8px;\n  display: inline-block;\n}\n.cg-tooltip-title-legacy {\n  font-weight: 900;\n}\n\n/* Tooltip symbol circle */\n.cg-tooltip-symbol.circle {\n  height: 10px;\n  width: 10px;\n  display: inline-block;\n  border-radius: 50%;\n  border: 1px solid rgba(0,0,0,.4);\n}\n/* Tooltip symbol line */\n.cg-tooltip-symbol.line {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: scale(1.2, 0.2);\n}\n/* Tooltip symbol diamond */\n.cg-tooltip-symbol.diamond {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    transform: rotate(45deg);\n    border-radius: 0px;\n}\n/* Tooltip symbol square */\n.cg-tooltip-symbol.square {\n    height: 10px;\n    width: 10px;\n    display: inline-block;\n    border-radius: 0px;\n    border: 1px solid rgba(0,0,0,.4);\n}\n\n","lang":"css"},"children":[]}]}]},{"$$mdtype":"Tag","name":"iframe","attributes":{"src":"https://dc2-documentation.s3.amazonaws.com/documentation/slb-docs-test/5.0/examples/vue/tutorials/index.html#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf?section=exportPDFCustom&extract=true","width":"100%","height":"689.5px","style":{"border":"none"}},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-to-pdf-via-nodejs","__idx":8},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#nodeJS2pdf"},"children":["#"]}," Export to PDF via NodeJS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section provides a simple demonstration of how to export WellLog widget to PDF via NodeJS.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"To do this:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to the the nodejs folder and run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm install"]},". Check to ensure node.js is installed. Supported version of node.js can be found in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["package.json"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm start"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The file ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["server-node-export-pdf.ts"]}," contains a standard initialization for ReportJS, loading custom fonts if necessary and export to PDF. The full source code can be found in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["examples/vue/tutorials/src/code/WellLog/AdditionalFunctionality/ExportToPDF/nodejs"]}," folder"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In source code:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"load-environment-settings-for-nodejs","__idx":9},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#"},"children":["#"]}," Load environment settings for node.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Load environment settings for node.js"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"code","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import '@int/geotoolkit/environment';\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"load-templates-of-the-header-and-the-footer-from-xml","__idx":10},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#"},"children":["#"]}," Load templates of the header and the footer from XML"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Load templates of the header and the footer from xml. There are in Report.JS format."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"code","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"fs.readFile('../templates/template-header.xml', (err, header) => {\n  fs.readFile('../templates/template-footer.xml', (err, footer) => {\n      ...\n  }\n}\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pre-process-data","__idx":11},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#"},"children":["#"]}," Pre-process data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pre-process templates with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lodash"]}," to apply data to templates."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"code","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"const headerTemplate = lodash.template(header.toString())(data);\nconst footerTemplate = lodash.template(footer.toString())(data);\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parse-template-to-reports","__idx":12},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#"},"children":["#"]}," Parse template to reports"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Parse template using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Report.JS"]}," to GeoToolkit and use parsed header as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["documentheader"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["documentfooter"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"code","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"const headerParser = new Parser(headerTemplate);\nconst footerParser = new Parser(footerTemplate);\nPromise.all([\n    headerParser.parse(),\n    footerParser.parse()\n]).then((templates) => {\n  ...\n});\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"source-code","__idx":13},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/WellLog/AdditionalFunctionality/ExportToPDF/exportToPdf#"},"children":["#"]}," Source Code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The source code of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["server-node-export-pdf.ts"]}," and stream implementation for node.js ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stream.ts"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"\n    import fs from 'fs';\n    import lodash from 'lodash-es';\n\n    import '@int/geotoolkit/environment';\n    import {obfuscate} from '@int/geotoolkit/lib';\n    import {FontSubType} from '@int/geotoolkit/pdf/FontSubType';\n    import {Orientation} from '@int/geotoolkit/util/Orientation';\n    import {PaperOrientation} from '@int/geotoolkit/scene/exports/PaperOrientation';\n    import {ScalingOptions} from '@int/geotoolkit/scene/exports/ScalingOptions';\n    import {PaperFormatFactory} from '@int/geotoolkit/scene/exports/PaperFormatFactory';\n    import {UnitFactory} from '@int/geotoolkit/util/UnitFactory';\n    import {Parser} from '@int/geotoolkit/report/Parser';\n    import {log} from '@int/geotoolkit/base';\n    import {CssLayout} from '@int/geotoolkit/layout/CssLayout';\n    import {Group} from '@int/geotoolkit/scene/Group';\n    import {Plot} from '@int/geotoolkit/plot/Plot';\n    import {Log2DDataRow} from '@int/geotoolkit/welllog/data/Log2DDataRow';\n    import {Log2DVisualData} from '@int/geotoolkit/welllog/data/Log2DVisualData';\n    import {DefaultColorProvider} from '@int/geotoolkit/util/DefaultColorProvider';\n    import {Log2DVisual, PlotTypes} from '@int/geotoolkit/welllog/Log2DVisual';\n    import {TrackType} from '@int/geotoolkit/welllog/TrackType';\n    import {createCanvasElement} from '@int/geotoolkit/dom';\n    import {CompositeLogCurve} from '@int/geotoolkit/welllog/CompositeLogCurve';\n    import {AdaptiveLogCurveVisualHeader} from '@int/geotoolkit/welllog/header/AdaptiveLogCurveVisualHeader';\n    import {HeaderType, LogAxisVisualHeader} from '@int/geotoolkit/welllog/header/LogAxisVisualHeader';\n    import {LogAxis} from '@int/geotoolkit/welllog/LogAxis';\n    import {AlignmentStyle, BaseLineStyle, TextStyle} from '@int/geotoolkit/attributes/TextStyle';\n    import {WellLogWidget} from '@int/geotoolkit/welllog/widgets/WellLogWidget';\n    import {MathUtil} from '@int/geotoolkit/util/MathUtil';\n    import {LogCurve} from '@int/geotoolkit/welllog/LogCurve';\n\n    import {NodeStream} from './utils/stream';\n    import {DataSource} from './datasource';\n    import {Node} from '@int/geotoolkit/scene/Node';\n    import {DataBinding} from '@int/geotoolkit/data/DataBinding';\n    import {DataBindingRegistry} from '@int/geotoolkit/data/DataBindingRegistry';\n    import {LogCurveDataSource} from '@int/geotoolkit/welllog/data/LogCurveDataSource';\n    import {AbstractUnit} from '@int/geotoolkit/util/AbstractUnit';\n    import {AbstractPaperFormat} from '@int/geotoolkit/scene/exports/AbstractPaperFormat';\n    import {PdfExport} from '@int/geotoolkit/pdf/PdfExport';\n\n    const barCodePngPath = '../templates/assets/images/bar-code.png';\n    const companyLogoPath = '../templates/assets/images/company-logo.png';\n    const robotoFontPath = '../../../../../assets/fonts/roboto.ttf';\n    class BindingFunction extends DataBinding {\n        accept (node: Node) {\n            return node instanceof LogCurve;\n        }\n        bind (curve: CompositeLogCurve, data: any) {\n            const info = curve.getId();\n            if (curve.getDataSource() != null) {\n                curve.getDataSource().clear();\n            }\n            const source = data.getCurveSource(info['id']);\n            if (source != null) {\n                curve.setData(source, true, true);\n                const limits = MathUtil.calculateNeatLimits(source.getMinValue(), source.getMaxValue());\n                curve.setNormalizationLimits(limits.getLow(), limits.getHigh());\n            }\n        }\n        unbind (node: Node, data?: any): void {\n        }\n    }\n    obfuscate(BindingFunction);\n\n\n    let plot: Plot | null = null,\n        data = null;\n    const widget = initializeScene();\n    printToPdf(widget);\n\n    function createWidget (data: DataSource) {\n        const range = data.getIndexRange();\n        const widget = new WellLogWidget({\n            'viewcache': false,\n            'range': range,\n            'indent': 0,\n            'header': {\n                'visible': true\n            },\n            'footer': {\n                'visible': false\n            },\n            'trackcontainer': {\n                'border': {'visible': true}\n            },\n            'border': {'visible': true},\n            'indextype': 'depth',\n            'indexunit': 'm',\n            'deviceunit': 'cm'\n        });\n        widget.setLayoutStyle({'left': 0, 'top': 0, 'right': 0, 'bottom': 0});\n\n        configureHeaders(widget);\n\n        // Add data binding for curve\n        (widget.getDataBinding() as DataBindingRegistry).add(new BindingFunction());\n        widget.setData(data);\n        data.update();\n        return widget;\n    }\n\n    function configureHeaders (widget: WellLogWidget) {\n        const CUSTOM_TEXT_STYLE = new TextStyle('rgb(0,0,0)', BaseLineStyle.Middle, AlignmentStyle.Left, '10px etfo');\n        const headerProvider = widget.getHeaderContainer().getHeaderProvider();\n\n        // configure Depth ant Time axis header\n        const logAxisVisualHeader = headerProvider.getHeaderProvider(LogAxis.getClassName()) as LogAxisVisualHeader;\n        logAxisVisualHeader.setHeaderType(HeaderType.Simple);\n\n        // configure curve header\n        const header = new AdaptiveLogCurveVisualHeader();\n        header.setElement('ScaleTo', {'anchor': AnchorType.RightCenter, 'section': 'top'});\n        header.setElement('ScaleFrom', {'anchor': AnchorType.LeftCenter, 'section': 'top'});\n        header.setElement('Line', {'anchor': AnchorType.Center, 'section': 'center'});\n        header.setElement('Name', {'anchor': AnchorType.Center, 'section': 'top'});\n        header.setElement('Unit', {'anchor': AnchorType.Center, 'section': 'bottom'});\n        header.setElement('Tracking', {'anchor': AnchorType.Center, 'section': 'bottom'});\n\n        header.setTextStyle(CUSTOM_TEXT_STYLE);\n        headerProvider.registerHeaderProvider(CompositeLogCurve.getClassName(), header);\n    }\n\n    function initializeScene () {\n        data = new DataSource();\n        const wellLogWidget = createWidget(data);\n\n        addDefaultTemplate(wellLogWidget, ['GR', 'CALI'], ['GR', 'Плотность'], ['#ef6c00', '#2196f3']);\n        addLog2DData(wellLogWidget);\n\n        wellLogWidget.setDepthLimits(4500, 5800);\n        const canvas = createCanvasElement(800, 800);\n\n        plot = addWidgetToCanvas(canvas, wellLogWidget);\n\n        // Tools\n        wellLogWidget.getToolByName('cross-hair')\n            .setEnabled(false);\n        wellLogWidget.invalidate();\n        return wellLogWidget;\n    }\n\n    function addLog2DData (widget: WellLogWidget) {\n        widget.addTrack(TrackType.LinearTrack)\n            .addChild([\n                create2DVisual(createLog2DTestData())\n                    .setPlotType(PlotTypes.Linear)\n            ]);\n    }\n\n    function create2DVisual (log2dData: Log2DVisualData): Log2DVisual {\n        const visual = new Log2DVisual();\n        visual.setData(log2dData);\n        const colors = new DefaultColorProvider();\n\n        const min = log2dData.getMinValue();\n        const max = log2dData.getMaxValue();\n\n        const delt = (max - min) / 4;\n        colors.addColor(min, 'green');\n        colors.addColor(min + delt, 'yellow');\n        colors.addColor(min + 2 * delt, 'orange');\n        colors.addColor(max - delt, 'blue');\n        colors.addColor(max, 'red');\n        visual.setColorProvider(colors);\n\n        return visual;\n    }\n\n    function createLog2DTestData (): Log2DVisualData {\n        const PI = Math.PI;\n        const maxDepth = 5800;\n        const minDepth = 4500;\n        const depthStep = (maxDepth - minDepth) / 10;\n        const log2dData = new Log2DVisualData();\n        for (let i = 1; i < depthStep; i++) {\n            const depth = minDepth + depthStep * i;\n            const values = [0, 1, 2, 3, 4];\n\n            const angles = [0, PI / 2, PI, PI * 3 / 2, PI * 2];\n            log2dData.getRows().push(new Log2DDataRow(depth, values, angles));\n        }\n        log2dData.updateLimits();\n        return log2dData;\n    }\n\n    function addWidgetToCanvas (canvasElement: HTMLCanvasElement, widget: WellLogWidget) {\n        // create a basic plot\n        const widgetPlot = new Plot({\n            'canvaselement': canvasElement,\n            'root': new Group()\n                .setAutoModelLimitsMode(true)\n                .setLayout(new CssLayout())\n                .addChild(widget),\n            'autosize': false,\n            'autorootbounds': true\n        });\n        widgetPlot.setSize(800, 800);\n        return widgetPlot;\n    }\n\n    function addDefaultTemplate (wellLogWidget: WellLogWidget, dataMnemonic: string[], curveMnemonic: string[], colors: string[]) {\n        for (let i = 0; i < curveMnemonic.length; i++) {\n            wellLogWidget.addTrack({\n                type: TrackType.IndexTrack,\n                width: i === 0 ? 70 : 50\n            })\n                .enableClipping(true);\n            const track = wellLogWidget.addTrack(TrackType.LinearTrack)\n                .enableClipping(true);\n            const logCurve = new CompositeLogCurve();\n            logCurve.setLineStyle({'color': colors[i], 'width': 2});\n            logCurve.setId({'id': dataMnemonic[i], 'wellId': 'wellId'} as any);\n            track.addChild(logCurve);\n            const ds = logCurve.getDataSource() as LogCurveDataSource;\n            ds.setData({\n                'name': curveMnemonic[i],\n                'depths': ds.getDepths(),\n                'values': ds.getValues()\n            });\n        }\n    }\n    function base64EncodeImage (file: string): string {\n        // read binary data\n        const bitmap = fs.readFileSync(file, 'base64');\n        return 'data:image/png;base64,' + bitmap;\n    }\n    function exportToPdf (widget: WellLogWidget) {\n        // Compute default paper format\n        const DOCUMENT_TITLE = 'Main Well';\n        const barCodePng = base64EncodeImage(barCodePngPath);\n        const companyLogo = base64EncodeImage(companyLogoPath);\n        const robotoFont = fs.readFileSync(robotoFontPath, 'base64');\n\n        const data = {\n            Title: DOCUMENT_TITLE,\n            CompanyName: 'Oil and Gas Company',\n            Address: {\n                Well: 'Oil and Gas main Well',\n                Field: 'MajorCamp',\n                County: 'Culberson',\n                State: 'Texas',\n                Country: 'USA'\n            },\n            Items: [\n                {\n                    Chanel: 'GR',\n                    Source: 'SPULSE-GEN:SPULSE-GEN:SPEC',\n                    Sampling: '6in - RT'\n                },\n                {\n                    Chanel: 'ROP5',\n                    Source: 'DRILLING_SURFACE',\n                    Sampling: '6in - RT'\n                },\n                {\n                    Chanel: 'GR',\n                    Source: 'SPULSE-GEN:SPULSE-GEN:SPEC',\n                    Sampling: '6in - RT'\n                }\n            ],\n            Parameters: [\n                {\n                    Name: 'BS',\n                    Description: 'Bit Size',\n                    Tool: 'DNMSESSION',\n                    Value: '6.125',\n                    Unit: 'in'\n                },\n                {\n                    Name: 'DFD',\n                    Description: 'Drilling Fluid Density',\n                    Tool: 'Borehole',\n                    Value: '10',\n                    Unit: 'lbm/gal'\n                }\n            ],\n            Images: {\n                BarCode: barCodePng,\n                CompanyLogo: companyLogo\n            }\n        };\n        const onFail = function (reason: string) {\n            log('Error : ' + reason);\n        };\n        fs.readFile('../templates/template-header.xml', (err, header) => {\n            fs.readFile('../templates/template-footer.xml', (err, footer) => {\n                const headerTemplate = lodash.template(header.toString())(data);\n                const footerTemplate = lodash.template(footer.toString())(data);\n                const headerParser = new Parser(headerTemplate);\n                const footerParser = new Parser(footerTemplate);\n                Promise.all([\n                    headerParser.parse(),\n                    footerParser.parse()\n                ]).then((templates) => {\n                    const limits = widget.getDepthLimits();\n\n                    const unitFactory = UnitFactory.getInstance();\n                    const px = unitFactory.getUnit('px');\n\n                    const printSettings: PdfExport.DocumentExportSettings = {\n                        'paperformat': PaperFormatFactory.getInstance().getPaper('A4', px as AbstractUnit,\n                            PaperOrientation.Portrait) as AbstractPaperFormat,\n                        'scaling': ScalingOptions.FitWidth,\n                        'keepaspectratio': false,\n                        'continuous': true,\n                        'top': 0.5,\n                        'bottom': 0.5,\n                        'left': 0.5,\n                        'right': 0.5,\n                        'units': 'cm'\n                    };\n                    const printUnit = unitFactory.getUnit(printSettings['units'] as string) as AbstractUnit;\n                    const marginL = Math.floor(printUnit.convert(printSettings['left'] as number, px as AbstractUnit));\n                    const marginR = Math.floor(printUnit.convert(printSettings['right'] as number, px as AbstractUnit));\n                    const marginT = Math.floor(printUnit.convert(printSettings['top'] as number, px as AbstractUnit));\n                    const marginB = Math.floor(printUnit.convert(printSettings['bottom'] as number, px as AbstractUnit));\n                    const paperInPixels = printSettings['paperformat'] as AbstractPaperFormat;\n                    const paperW = Math.floor(paperInPixels.getWidth());\n                    const paperH = Math.floor(paperInPixels.getHeight());\n                    const templateWidth = widget.getOrientation() === Orientation.Vertical ?\n                        paperW - marginL - marginR :\n                        paperH - marginT - marginB;\n                    const headerElement = templates[0] ? templates[0].getRootElement(templateWidth) : null;\n                    const footerElement = templates[1] ? templates[1].getRootElement(templateWidth) : null;\n                    const stream = new NodeStream('pdfexport-result.pdf');\n\n                    const pdfOptions: WellLogWidget.ExportToPdfOptions = {\n                        'output': 'Widget',\n                        'printsettings': printSettings,\n                        'deviceunit': widget.getDeviceUnit(),\n                        'indexunit': widget.getIndexUnit(),\n                        'scale': widget.getDepthScale(),\n                        'limits': {\n                            'start': limits.getLow(),\n                            'end': limits.getHigh()\n                        },\n                        'pdfstream': stream,\n                        'documentheader': headerElement as any, // temporary\n                        'documentfooter': footerElement as any,\n                        'embededfonts': [\n                            {\n                                subtype: FontSubType.TrueType,\n                                fontname: 'roboto',\n                                fontweight: 'normal',\n                                fontstyle: 'normal',\n                                fontbase64encodedfile: robotoFont,\n                                encoding: 'Identity-H'\n                            }\n                        ]\n                    };\n                    widget.exportToPdf(pdfOptions).then(() => {\n                        stream.close();\n                        end(widget);\n                    });\n                }, (reason) => {\n                    onFail(reason);\n                });\n            });\n        });\n    }\n\n    function printToPdf (widget: WellLogWidget) {\n        exportToPdf(widget);\n    }\n\n    function end (widget: WellLogWidget) {\n        if (plot) plot.dispose();\n        process.exit();\n    }\n","lang":"ts"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Stream","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"\n    import {obfuscate} from '@int/geotoolkit/lib';\n    import {IWritable} from '@int/geotoolkit/util/stream/IWritable';\n    import fs from 'fs';\n\n    /**\n     * Defines PDF stream Export in NodeJS environment.\n     *\n     */\n    export class NodeStream extends IWritable {\n        private _fileName: string | null;\n        private _offset: number;\n        private _fd: number;\n        constructor (fileName: string) {\n            super();\n            if (fileName == null || fileName === '') {\n                fileName = 'output.pdf';\n            }\n            this._fileName = fileName;\n            this._offset = 0;\n            this._fd = fs.openSync(this._fileName, 'w+');\n        }\n        dispose () {\n            this._fileName = null;\n            this._offset = 0;\n            this._fd = 0;\n        }\n        out (str: string): number {\n            if (typeof str !== 'string' || str.length < 0) return this._offset;\n            if (this._fd == null) return this._offset;\n            const newContent = new Uint8Array(str.length);\n            for (let i = 0; i < str.length; ++i) {\n                newContent[i] = str.charCodeAt(i);\n            }\n            const buffer = Buffer.from(newContent);\n            fs.appendFileSync(this._fd, buffer);\n            this._offset += newContent.length;\n            return this._offset;\n        }\n        close (): this {\n            return this;\n        }\n        save () {\n            fs.closeSync(this._fd);\n            this._fd = 0;\n        }\n        getContent (): string | null {\n            return null;\n        }\n    }\n    obfuscate(NodeStream);\n    \n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Close"]}]},"headings":[{"value":"Export to PDF","id":"export-to-pdf","depth":1},{"value":"Export to PDF without headers and footers","id":"export-to-pdf-without-headers-and-footers","depth":3},{"value":"Export to PDF with Custom Document Header and Footer","id":"export-to-pdf-with-custom-document-header-and-footer","depth":3},{"value":"Export to PDF with Custom Page Header and Footer","id":"export-to-pdf-with-custom-page-header-and-footer","depth":3},{"value":"Export to PDF Using Templates","id":"export-to-pdf-using-templates","depth":3},{"value":"Export to PDF Using Templates with Page Breaks","id":"export-to-pdf-using-templates-with-page-breaks","depth":3},{"value":"Export to PDF with WellLog Page Header","id":"export-to-pdf-with-welllog-page-header","depth":3},{"value":"Export to PDF with Custom Font","id":"export-to-pdf-with-custom-font","depth":3},{"value":"Export to PDF via NodeJS","id":"export-to-pdf-via-nodejs","depth":3},{"value":"Load environment settings for node.js","id":"load-environment-settings-for-nodejs","depth":3},{"value":"Load templates of the header and the footer from XML","id":"load-templates-of-the-header-and-the-footer-from-xml","depth":3},{"value":"Pre-process data","id":"pre-process-data","depth":3},{"value":"Parse template to reports","id":"parse-template-to-reports","depth":3},{"value":"Source Code","id":"source-code","depth":3}],"frontmatter":{"title":"Export to PDF","seo":{"title":"Export to PDF"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/tutorials/well-log/additional-functionality/export-to-pdf","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}