<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
<meta>
  <topic id="redaction" indexer="include" status="PUBLISH">
    <title id="tit">Automatic Redaction</title>
    <filename>/text/shared/guide/auto_redact.xhp</filename>
  </topic>
</meta>
<body>
  <bookmark branch="index" id="bm_id821562797360035">
    <bookmark_value>spreadsheet; auto-redact</bookmark_value>
    <bookmark_value>presentations; auto-redact</bookmark_value>
    <bookmark_value>text documents; auto-redact contents</bookmark_value>
    <bookmark_value>automatic redaction</bookmark_value>
  </bookmark>

  <section id="autoredact01">
    <bookmark branch="hid/sfx/ui/autoredactdialog/" id="bm_id3145208" localize="false"/>
    <h1 id="hd_id171562795247122"><variable id="autoredact_h1"><link href="text/shared/guide/auto_redact.xhp">Automatic Redaction</link></variable></h1>
    <paragraph id="par_id4715627952214572" role="paragraph"><variable id="auto_redact_var"><ahelp hid="sfx/ui/autoredactdialog/">Use automatic redaction to define words and patterns that are automatically marked for redaction.</ahelp></variable></paragraph>
  </section>
  <paragraph role="paragraph" id="par_id641647277510873">Automatic redaction makes it easier to redact %PRODUCTNAME documents that have multiple portions of text that need to be hidden due to sensitivity or privacy issues.</paragraph>
  <section id="howtoget">
    <paragraph role="paragraph" id="par_id961562795750725">Choose <menuitem>Tools - Auto-Redact</menuitem></paragraph>
  </section>
  <paragraph role="paragraph" id="par_id551626027709362">This feature comes in handy in documents that have multiple occurrences of names and other personal information (e.g. credit cards, phone numbers, etc). Redacting all these portions of the document manually would required significant effort, but with Automatic Redaction this task can be automated in a more efficient manner.</paragraph>
  <h2 id="hd_id11626028179231">Creating Targets</h2>
  <paragraph role="paragraph" id="par_id211626097811059">Targets are rules and patterns used by Automatic Redaction to find portions of the document to be automatically marked for redaction.</paragraph>
  <paragraph role="paragraph" id="par_id851626028193218">To create a new target, click the <menuitem>Add Target</menuitem> button.</paragraph>
  <paragraph role="paragraph" id="par_id101626028852152">The <emph>Add Target</emph> dialog appears, to let you define a <emph>Name</emph> for the new target, as well as to choose its <emph>Type</emph> and <emph>Content</emph>. There are three types of targets to choose from in the <emph>Type</emph> dropdown list:</paragraph>
  <list type="unordered">
    <listitem>
        <paragraph id="par_id241626028988544" role="listitem"><emph>Text</emph>: Automatic Redaction will look for all occurrences of the specified text and mark them for redaction.</paragraph>
    </listitem>
    <listitem>
        <paragraph id="par_id31626028992866" role="listitem"><emph>Regular expression</emph>: Define a regular expression to use to search the document. All matches will be marked for redaction.</paragraph>
    </listitem>
    <listitem>
        <paragraph id="par_id391626028994653" role="listitem"><emph>Predefined</emph>: Choose predefined regular expressions to automatically redact contents, such as credit card numbers, email addresses and so on.</paragraph>
    </listitem>
  </list>

  <paragraph role="paragraph" id="par_id181626029575406">Add all targets that you want to apply to your document and click <emph>OK</emph>. This opens the document as a drawing in %PRODUCTNAME Draw with all targets automatically redacted with the <emph>Rectangle Redaction</emph> tool.</paragraph>
  <paragraph role="paragraph" id="par_id611626029791762">Continue redacting other portions of the generated document and then print or export it to PDF.</paragraph>
  <tip id="par_id581626101004089">Refer to the help page <link href="text/shared/01/02100001.xhp">List of Regular Expressions</link> to learn more about how to use regular expressions in %PRODUCTNAME.</tip>
  <h2 id="hd_id951626029985729">Exporting and Importing Targets</h2>
  <paragraph role="paragraph" id="par_id701626030005749">Click the <emph>Save Targets</emph> button to save all defined targets in the document as a JSON (JavaScript Object Notation) file.</paragraph>
  <paragraph role="paragraph" id="par_id971626030103135">Click the <emph>Load Targets</emph> button to import and apply the targets defined in a JSON file to another %PRODUCTNAME document.</paragraph>
  <note id="par_id311626030327293">The document automatic redaction targets are saved alongside the document. Hence, they are available in the document after you save and close it.</note>
  <section id="relatedtopics">
    <embed href="text/shared/guide/redaction.xhp#redaction_h1"/>
    <embed href="text/shared/01/ref_pdf_export.xhp#ref_pdf_export"/>
  </section>
</body>
</helpdocument>
