Skip to content

Commit 7d5f73a

Browse files
committed
docs: Add requirements and limitations section to PDF conversion form
Documents the following constraints: - Single-page PDFs only (multi-page not supported) - Maximum 5MB file size - Text-based PDFs work best - Complex tables may need manual adjustment
1 parent 74fdeb0 commit 7d5f73a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • cloudformation/scenarios/localgov-drupal/drupal/web/modules/custom/ndx_aws_ai/src/Form

cloudformation/scenarios/localgov-drupal/drupal/web/modules/custom/ndx_aws_ai/src/Form/PdfConversionForm.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,25 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
103103
],
104104
];
105105

106+
// Constraints notice.
107+
$form['constraints'] = [
108+
'#type' => 'details',
109+
'#title' => $this->t('Requirements and limitations'),
110+
'#open' => TRUE,
111+
'#attributes' => ['class' => ['form-constraints']],
112+
'list' => [
113+
'#theme' => 'item_list',
114+
'#items' => [
115+
$this->t('<strong>Single-page PDFs only</strong> - Multi-page PDFs are not currently supported. Please split multi-page documents before uploading.'),
116+
$this->t('<strong>Maximum file size: @size MB</strong> - Larger files will be rejected.', [
117+
'@size' => self::MAX_UPLOAD_SIZE_MB,
118+
]),
119+
$this->t('<strong>Text-based PDFs work best</strong> - Scanned documents or image-heavy PDFs may have reduced accuracy.'),
120+
$this->t('<strong>Tables are extracted separately</strong> - Complex table layouts may require manual adjustment after conversion.'),
121+
],
122+
],
123+
];
124+
106125
// File upload.
107126
$form['pdf_file'] = [
108127
'#type' => 'managed_file',

0 commit comments

Comments
 (0)