Documentation
7-PDF Attach Extract And Remove Files – GUI & CLI Documentation
ℹ️ Quick orientation: What can I find here – and what is covered in the FAQs?
This documentation primarily covers the use of 7-PDF Attach Extract and Remove – including GUI workflows, CLI mode, technical example calls and notes on use for approved internal workflows.
- Here in the documentation: Explanation of user interface functions and interaction options, parameters/switches, Attachment management, technical example commands, licensing information.
- In the FAQs: background information on ZUGFeRD (EN 16931) and the AI-assisted service 7-PDF Invoice Extractor – including prerequisites, suitable source material, typical pitfalls and notes on the required review.
👉 Go to the FAQs: FAQ – Attach Extract & Remove | FAQ – 7-PDF Invoice Extractor (AI)
⚠️ Important note on PDF/ZUGFeRD, API tokens and automation
This documentation describes the technical use of 7-PDF Attach Extract and Remove, including GUI, CLI, attachment management and technical example calls.
The 7-PDF Invoice Extractor for PDF/ZUGFeRD workflows is currently not offered as a freely bookable standard service. API tokens are provided only after prior testing with your own suitable PDF invoices, subsequent request, review of the use case and subject to available resources.
This documentation does not grant any general approval for productive automation, ERP/factoring system integration, portals, SaaS offerings, managed services, third-party applications or the processing of invoices for third parties.
The AI-assisted PDF/ZUGFeRD workflow does not replace an invoicing, accounting or ERP solution with native e-invoice creation. Generated results must always be reviewed visually, professionally, in terms of content, formally and technically. Responsibility remains with the user or invoice issuer.
Operation via tab-based GUI or command line
The tool 7-PDF Attach Extract And Remove Files offers two ways of operation:
- a GUI with tab structure for visual operation
- a CLI (Command Line Interface) for technically experienced users and approved internal workflows
The most important functions are accessible in the user interface by clicking and are mainly suitable for controlled single-file processing. The CLI is intended for technically experienced users and is provided for approved internal use.
Use as a productive ERP, invoicing, portal, SaaS, managed-service or third-party application integration is not part of the standard provision.
Video tutorial for 7-PDF Attach Extract & Remove - still without the "PDF invoice to PDF ZUGFeRD" tab
The video illustrates the tabs "Attach", "Extraction" and "Remove" for file attachments in PDF documents. The "PDF invoice to PDF ZUGFeRD" tab is not yet included here; however, the basic operation is comparable to the other tabs.
Notes on how suitable PDF invoices from Word, Excel or other applications can be integrated into a controlled PDF/ZUGFeRD workflow can be found in our step-by-step guide. Please note the prerequisites, the required review and the restricted provision of API tokens.
🖱️ Overview of GUI tabs and functions
| Tab | Function |
|---|---|
| Attach file to PDF | Embeds external files into a PDF/A-3 file, e.g. an XML file according to ZUGFeRD. |
| Extract file from PDF | Extracts specific embedded files from a PDF file. |
| Remove file from PDF | Removes embedded files by type or name. |
| PDF invoice to PDF ZUGFeRD | Prepares suitable, machine-readable PDF invoices with AI assistance for a review-required PDF/ZUGFeRD workflow. Use requires an approved API token. |
| Data protection | Consent and information on processing when using the server-assisted service. |
| License/Info | License status can be viewed. |
⚠️ Important note on PDF/ZUGFeRD processing
The PDF/ZUGFeRD workflow requires suitable, machine-readable PDF invoices. Not every PDF invoice is suitable for AI-assisted processing.
Only controlled single invoices are supported. Consolidated invoices, heavily multipart documents, scans, image-based PDFs, subsequently reprinted PDF invoices, strongly varying layouts or complex special cases may lead to parser errors or implausible results.
Consolidated invoices or multipart documents should not be processed without review. If a document is technically split, each generated single invoice must then be reviewed completely.
The generated PDF/ZUGFeRD results must always be reviewed visually, professionally, in terms of content, formally and technically before being passed on.
🔐 Licensing & free invoice runs for PDF/ZUGFeRD workflows
- 7-PDF Attach Extract and Remove can be used for classic PDF attachment management, e.g. for attaching, extracting or removing embedded files.
- For AI-assisted PDF/ZUGFeRD processing with the 7-PDF Invoice Extractor, an approved API token is required.
- API tokens and corresponding packages are currently not freely bookable. Provision is only possible after prior testing with your own suitable PDF invoices, request, review and availability.
- Any test or free contingents serve exclusively for initial technical assessment and do not establish any entitlement to later provision, activation or productive use.
📍 Preparing a PDF invoice for a PDF/ZUGFeRD workflow – important notes
-
PDF/A-3b files (ISO 19005-3)
A suitable PDF/A-3b document is required for a PDF/ZUGFeRD workflow. Depending on the source material, a PDF printing workflow with 7-PDF Printer may be integrated. However, 7-PDF Printer alone does not create a ZUGFeRD or e-invoice. -
Suitable, machine-readable PDF invoices
Prerequisites are clearly structured, machine-readable PDF invoices with complete and plausible invoice data. Scans, image-based PDFs, strongly varying layouts or complex special cases are not suitable for blanket processing. -
GUI use
The GUI offers drag & drop and visual feedback for controlled single-file processing. -
CLI use
The CLI can be used for approved internal workflows. Use for productive ERP/invoicing integration, portals, SaaS offerings, managed services, third-party applications or processing for third parties is not part of the standard provision.
💡 Transparency & quality: The AI-assisted PDF/ZUGFeRD workflow is primarily intended for small companies, self-employed professionals, freelancers and users with controlled manual invoice runs. It complements existing tools, but does not replace an invoicing, accounting or ERP solution with native e-invoice creation.
Since AI-assisted recognition may vary in individual cases, every generated PDF/ZUGFeRD e-invoice must be reviewed visually, professionally, in terms of content, formally and technically before being passed on. Responsibility remains with the invoice issuer.
Automation: Technically documented CLI or API examples do not constitute general approval for unchecked automatic processing. Without secure review chains, automatic dispatch to third parties should be avoided.
💡 CLI mode – command line operation
CLI mode is intended for technically experienced users and can be used for approved internal workflows.
Please note: The technical existence of CLI parameters does not constitute general approval for productive automation, ERP/invoicing integration, portals, SaaS offerings, managed services, third-party applications or the processing of invoices for third parties.
Start via:
PDFAttachExtractAndRemoveFiles.exe -mode "console" -usage "attach" -inpdf "Invoice.pdf" -infile "factur-x.xml"
Available CLI parameters
| Parameter | Description |
|---|---|
-mode | gui (default), console, hidden |
-usage | attach, extract, remove, generate |
-inpdf | Path to the input file (PDF/A-3) |
-infile | File to attach, e.g. XML |
-outpath | Target path for extraction |
-fileext | File type filter, e.g. .xml |
-byName | Extract or remove a single file by name |
-estandard | ZUGFeRD version: ZF1, ZF2, ZF21 (recommended) |
-apiToken | API token for using the AI web service |
-logfile | Optional: log output to file when using hidden |
Example commands
:: Attach file:
PDFAttachExtractAndRemoveFiles.exe -mode "console" -usage "attach" -inpdf "invoice.pdf" -infile "factur-x.xml" -estandard "ZF21"
:: Extract file:
PDFAttachExtractAndRemoveFiles.exe -mode "console" -usage "extract" -inpdf "invoice.pdf" -outpath "C:\Output" -fileext ".xml"
:: Remove file:
PDFAttachExtractAndRemoveFiles.exe -mode "console" -usage "remove" -inpdf "invoice.pdf" -byName "factur-x.xml"
:: Convert PDF to ZUGFeRD:
PDFAttachExtractAndRemoveFiles.exe -mode "console" -usage "generate" -inpdf "invoice.pdf" -apiToken "YOUR_TOKEN"
Note: Approved only from Team or Enterprise subscription (API token).
Exit codes
0= Successful execution ✅1= Error during execution ❌2= License required
🔌 API access via FastAPI & CURL
Important: Direct API access to the 7-PDF Invoice Extractor is currently not freely bookable and is available to new customers only after prior testing, request, review and availability. Commercial third-party application integration, portal use, SaaS use, managed-service use or processing for third parties is not part of the standard provision.
The 7-PDF Invoice Extractor can evaluate suitable, machine-readable PDF invoices with AI assistance and provide structured data or XML results for a review-required PDF/ZUGFeRD workflow.
Access is technically provided via a token-based HTTPS POST endpoint. The examples shown here are for technical documentation purposes and do not replace approval for productive use or integration.
Processing is server-assisted. No fallback or offline solution is provided for the online service. The service is not intended as a highly available ERP or invoicing replacement solution.
The generated results may contain errors and must always be reviewed visually, professionally, in terms of content, formally and technically before being passed on.
Example: Technically evaluate a suitable PDF invoice via CURL
curl -X POST https://generator.7-pdf.de/extract-invoice/ \
-H "accept: application/json" \
-H "Authorization: Bearer [[ T O K E N - C O D E ]]" \
-H "Content-Type: multipart/form-data" \
-F "file=@/Users/username/Documents/Invoice.pdf"
Response, technical example:
{
"success": true,
"invoice_number": "2825056",
"xml": "<?xml version=\"1.0\" ?>\n<rsm:CrossIndustryInvoice ...",
"validation_file": "passed",
"validation_string": "passed"
}
The example response is for technical illustration only. Technical success of the call does not replace professional, content-related, formal or technical review of the generated results.
You can technically reproduce the API call using tools such as Postman or in your own scripts, provided that an approved API token is available.
PowerShell example: Technically evaluate a suitable PDF invoice
The following example shows the technical call of the 7-PDF Invoice Extractor via a PowerShell script. It is intended as technical documentation for approved internal use.
Please note: Use requires an approved API token. The generated data is subject to review and is not intended for unchecked automatic dispatch.
# Store that Script Code under: GetFacturXFromPDF.ps1 # Call: .\GetFacturXFromPDF.ps1 # Params: -PdfPath "C:\inv\2025-05-17.pdf" -ApiToken "[[ T O K E N - C O D E ]]" param ( [Parameter(Mandatory = $true)] [string]$PdfPath, [Parameter(Mandatory = $true)] [string]$ApiToken ) # 1. Send PDF to "7-PDF Invoice Extractor" - FastAPI curl.exe -X POST "https://generator.7-pdf.de/extract-invoice/" ` -H "accept: application/json" ` -H "Authorization: Bearer $ApiToken" ` -H "Content-Type: multipart/form-data" ` -F "file=@$PdfPath" ` -o response.json # 2. Read JSON Response $json = Get-Content -Raw -Path .\response.json | ConvertFrom-Json # 3. Extract and store ZUGFeRD XML $json.xml | Set-Content -Encoding UTF8 -Path .\factur-x.xml
Example call in a PowerShell window:
.\GetFacturXFromPDF.ps1 "C:\inv\2025-05-17.pdf" -ApiToken "[[ T O K E N - C O D E ]]"
Note: Replace [[ T O K E N - C O D E ]] with your approved
personal API token. The generated results must be fully reviewed before being passed on.
PowerShell example: Technically prepare suitable PDF invoices from a folder
Important: The following script is a technical example. It is not to be understood as a recommendation for unchecked mass processing, productive ERP/invoicing integration or automatic dispatch to third parties. Every generated PDF/ZUGFeRD output state must be reviewed before being passed on.
The following PowerShell script shows, by way of example, how suitable PDF invoices can be technically integrated into a PDF/ZUGFeRD workflow. It requires that the PDF invoices are suitable, machine-readable and have previously been tested with your own typical invoices.
The ZUGFeRD XML is attached using 7-PDF Attach Extract and Remove. Since a suitable PDF/A-3b document is required for a PDF/ZUGFeRD workflow, an additional PDF/A workflow with 7-PDF Printer Professional may be required.
Access to the 7-PDF Invoice Extractor requires an approved API token.
The script expects 3 parameters:
-InputFolder "[Path to the suitable PDF invoices]"
-OutputFolder "[Output path for the prepared PDF/ZUGFeRD files]"
-ApiToken "[[ T O K E N - C O D E ]]"
Note: Test or trial processing is only intended for initial technical assessment. Productive use requires approval, API token and review of the results.
Here is the PowerShell code:
param (
[Parameter(Mandatory = $true)] [string]$InputFolder,
[Parameter(Mandatory = $true)] [string]$OutputFolder,
[Parameter(Mandatory = $true)] [string]$ApiToken
)
function Get-7PdfPrinterAppPath {
$key = 'HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers'
$printers = Get-ChildItem -Path $key -ErrorAction SilentlyContinue
foreach ($printer in $printers) {
$desc = Get-ItemProperty -Path "$key\$($printer.PSChildName)" -ErrorAction SilentlyContinue
if ($desc.Description -like "*7-PDF Printer*") {
$appFolder = $desc.AppFolder
if ($appFolder -and (Test-Path $appFolder)) {
return $appFolder
}
}
}
return $null
}
function Escape-PathForPostScript {
param ([string]$Path)
return ($Path -replace '\\', '/' -replace ' ', '\\ ')
}
function Save-PostScriptForPdfA3 {
param (
[string]$TargetFilePath,
[string]$ICCPath,
[string]$Title = "PDF Title",
[string]$Author = "PDF Author",
[string]$Subject = "PDF Subject",
[string]$Keywords = "PDF/A, ZUGFeRD",
[string]$Producer = "7-PDF Printer",
[string]$Creator = "7-PDF Printer"
)
$iccUnix = Escape-PathForPostScript $ICCPath
$postScriptText = @"
%!
% This is a sample prefix file for creating a PDF/A document.
% Users should modify entries marked with "Customize".
% This assumes an ICC profile resides in the file (srgb.icc),
% in the current directory unless the user modifies the corresponding line below.
% Define entries in the document Info dictionary :
[ /Title ($Title)
/Author ($Author)
/Subject ($Subject)
/Keywords ($Keywords)
/Producer ($Producer)
/Creator ($Creator)
/DOCINFO pdfmark
% Define an ICC profile :
/ICCProfile ($iccUnix) % Customize
def
[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark
[{icc_PDFA}
<<
%% ----------8<--------------8<-------------8<--------------8<----------
systemdict /ColorConversionStrategy known {
systemdict /ColorConversionStrategy get cvn dup /Gray eq {
pop /N 1 false
}{
dup /RGB eq {
pop /N 3 false
}{
/CMYK eq {
/N 4 false
}{
(\tColorConversionStrategy not a device space, falling back to ProcessColorModel, output may not be valid PDF/A.\n)=
true
} ifelse
} ifelse
} ifelse
} {
(\tColorConversionStrategy not set, falling back to ProcessColorModel, output may not be valid PDF/A.\n)=
true
} ifelse
{
currentpagedevice /ProcessColorModel get
dup /DeviceGray eq {
pop /N 1
}{
dup /DeviceRGB eq {
pop /N 3
}{
dup /DeviceCMYK eq {
pop /N 4
} {
(\tProcessColorModel not a device space.)=
/ProcessColorModel cvx /rangecheck signalerror
} ifelse
} ifelse
} ifelse
} if
%% ----------8<--------------8<-------------8<--------------8<----------
>> /PUT pdfmark
[
{icc_PDFA}
{ICCProfile (r) file} stopped
{
(\n\tFailed to open the supplied ICCProfile for reading. This may be due to\n) print
(\t an incorrect filename or a failure to add --permit-file-read=<profile>\n) print
(\t to the command line. This PostScript program needs to open the file\n) print
(\t and you must explicitly grant it permission to do so.\n\n) print
(\tPDF/A processing aborted, output may not be a PDF/A file.\n\n) print
cleartomark
}
{
/PUT pdfmark
[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
[{OutputIntent_PDFA} <<
/Type /OutputIntent
/S /GTS_PDFA1
/DestOutputProfile {icc_PDFA}
/OutputConditionIdentifier (sRGB) % Customize
>> /PUT pdfmark
[{Catalog} << /OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
} ifelse
"@
Set-Content -Path $TargetFilePath -Value $postScriptText -Encoding ASCII
}
function Convert-ToPdfA3b {
param (
[string]$InputPdf,
[string]$PrinterAppPath
)
$gsExe = Join-Path $PrinterAppPath "gs\gswin64c.exe"
$iccFile = Join-Path $PrinterAppPath "icc\sRGB_IEC61966-2-1_no_black_scaling.icc"
$dir = Split-Path $InputPdf
$psFile = Join-Path $dir "lib_PDFA_def.ps"
$tempPdfa = Join-Path $dir ("A_" + [System.IO.Path]::GetFileName($InputPdf))
if (-not (Test-Path $gsExe)) {
Write-Warning "Ghostscript not found: $gsExe"
return $false
}
if (-not (Test-Path $iccFile)) {
Write-Warning "ICC profile missing: $iccFile"
return $false
}
Save-PostScriptForPdfA3 -TargetFilePath $psFile -ICCPath $iccFile
# Ghostscript-Args
$args = @(
"--permit-file-read=$iccFile",
"-sDEVICE=pdfwrite",
"-dPDFACompatibilityPolicy=1",
"-dPDFA=3",
"-sColorConversionStrategy=RGB",
"-o", "`"$tempPdfa`"",
"`"$psFile`"",
"`"$InputPdf`""
)
& "$gsExe" @args 2>&1 | Tee-Object "$env:TEMP\gs_pdfa3b.log"
if (Test-Path $tempPdfa) {
Move-Item $tempPdfa $InputPdf -Force
Remove-Item $psFile -Force -ErrorAction SilentlyContinue
return $true
} else {
Write-Warning "PDF/A conversion failed for: $InputPdf (see $env:TEMP\gs_pdfa3b.log)"
return $false
}
}
# Tool path to ZUGFeRD processor
$toolPath = "C:\Program Files (x86)\7-PDF\7-PDF Attach Extract And Remove Files\PDFAttachExtractAndRemoveFiles.exe"
if (-not (Test-Path $toolPath)) {
Write-Error "ZUGFeRD processor not found: $toolPath"
exit 1
}
if (-not (Test-Path $OutputFolder)) {
Write-Host "Creating output folder: $OutputFolder"
New-Item -ItemType Directory -Path $OutputFolder | Out-Null
}
$appPath = Get-7PdfPrinterAppPath
if (-not $appPath) {
Write-Error "7-PDF Printer not found in registry."
exit 1
}
$successCount = 0
$errorCount = 0
Get-ChildItem -Path $InputFolder -Filter *.pdf | ForEach-Object {
$inputFile = $_.FullName
$basename = $_.BaseName
$outputFile = Join-Path $OutputFolder "$basename.pdf"
Write-Host "Processing: $inputFile -> $outputFile"
Copy-Item $inputFile $outputFile -Force
if (-not (Convert-ToPdfA3b -InputPdf $outputFile -PrinterAppPath $appPath)) {
$errorCount++
return
}
$argLine = "-mode `"hidden`" -usage `"generate`" -inpdf `"$outputFile`" -apiToken `"$ApiToken`""
$proc = Start-Process -FilePath "$toolPath" -ArgumentList $argLine -Wait -NoNewWindow -PassThru
if ($proc.ExitCode -eq 0) {
$successCount++
} else {
Write-Warning "ZUGFeRD processing failed (ExitCode $($proc.ExitCode)): $outputFile"
$errorCount++
}
}
Write-Host ""
Write-Host "Script finished."
Write-Host "Successfully processed: $successCount file(s)"
Write-Host "Failed: $errorCount file(s)"
Notes on direct API access
- Technical access to the 7-PDF Invoice Extractor for approved internal use cases.
- Token-based HTTPS transmission for suitable PDF invoices.
- Return of structured technical results for further review.
- No general approval for portals, SaaS offerings, managed services, third-party applications or processing for third parties.
- No replacement for invoicing, accounting or ERP solutions with native e-invoice creation.
Download tool Request API token / availability
Registration of the license key in the application
Your personal license key can be activated as a full version after you have acquired the license in the already installed program using the button "Insert license-key, ..." in the tab "Info". As an illustration, we have a graphic below that shows the button "Enter license key, ..." within the software:

Note: When the license key is entered, it is validated and activated over the Internet (via SSL). Therefore, make sure you have an active internet connection for the unique registration process of the application! In rare cases, locally installed third-party application firewalls may block the program's access to the Internet. When using such third-party firewalls, make sure to grant the necessary rights for access to the Internet for the one-time registration process of the application.
Unfortunately, the issue of software piracy is also harmful to us and we have to face this piracy. This is the only way for us to continue to provide you with maintenance or support services free of charge.
Automatic license distribution for 7-PDF Attach Extract and Remove FULLVERSION
In addition to the manual entry in the installed program, licensing can also be automated in the context of a deployment. For this you set a corresponding registry entry.
For licensing as part of a deployment on "many" (!) PCs, Citrix od TS Systems, at the same time, please contact us. This requires a special key (!) that you can distribute directly, either via an INI file or better via a registry entry. The license key you purchased is not a special key, so there is no point in entering it plain into the registry.
The screenshot below shows the path to capture the special license key within the registry (SpecialKey).

By setting the license key in the "Code" key, the software then launches as a FULL VERSION.
On Citrix and TS Systems it is usually sufficient to start the application with "Run as administrator" and to manually enter the license key you have acquired as admin in the application for licensing. The registry key shown in the figure above is set by the application itself in this scenario. However, this step must be carried out manually for each terminal server. If you have a large number of terminal servers, it is advisable to contact us as well. This scenario also requires a special key that you can distribute automatically.
Automatic deployment / software distribution
To distribute the software, the setup supports the installation parameters /SILENT and /VERYSILENT.
If you have further questions about the program, please feel free to contact our free email support. Otherwise, we wish you great success and enjoyment with PDF Attach Extract And Remove Files!