losLab PDF Library zapewnia zespołom Delphi i C++Builder silnik PDF z dostępnym kodem źródłowym dla przepływów desktopowych, serwerowych, DLL, ActiveX i Dylib, z wbudowanymi kontrolami PDF/A i PDF/UA, podpisami PAdES oraz wyborem renderera bez wysyłania dokumentów do zewnętrznej usługi PDF.
Ten artykuł jest przeznaczony dla developers generating accessible reports, statements, manuals, or public documents from Delphi. Traktuje tagged PDF accessibility structure jako produkcyjną inżynierię dokumentów, a nie pojedyncze wywołanie komponentu.
Praktyczne ryzyko polega na tym, że a PDF can contain text and still be inaccessible if headings, tables, artifacts, alternate text, and reading order are missing or wrong. Dlatego przepływ wymaga spisanego kontraktu, obserwowalnej diagnostyki i realistycznych plików regresyjnych.
Decyzje architektoniczne
Design semantic structure while generating content. heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping / alternate text ownership for charts, logos, signatures, and decorative images
- heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping
- alternate text ownership for charts, logos, signatures, and decorative images
- reading order for multi-column, repeated-header, and mixed-language content
- validation profile and manual review process for generated samples
Przebieg implementacji
Treat tags as document data, not decoration. Poniższa kolejność zachowuje czytelność przepływu pracy dla zespołów Delphi i C++Builder.
- build a semantic outline in parallel with visual layout
- tag content as it is emitted so page geometry and structure stay aligned
- mark decorative elements as artifacts and supply alternate text for meaningful images
- validate PDF/UA-related diagnostics and inspect reading order manually
- keep accessible reference samples for every report template family
Dowody walidacji
Accessibility evidence for generated PDFs. Zachowaj te pola wraz z wynikiem lub rekordem wsparcia.
- structure tree summary, role map, heading order, table structure, and artifact count
- alternate text coverage for figures and chart-like content
- reading-order review notes for representative pages
- PDF/UA diagnostic report and remediation decisions
Reading order is an authoring responsibility
Tagged PDF output requires a structure tree, role mapping, alternate text, table relationships, artifacts, and reading order that match the visual document. Retrofitting those semantics after layout is far harder.
Decision table for tagged PDF accessibility structure
A decision table keeps product ownership visible when the same workflow is reused by a desktop tool, service job, and support utility.
| Decision | Engineering reason | Evidence |
|---|---|---|
| heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping | build a semantic outline in parallel with visual layout | structure tree summary, role map, heading order, table structure, and artifact count |
| alternate text ownership for charts, logos, signatures, and decorative images | tag content as it is emitted so page geometry and structure stay aligned | alternate text coverage for figures and chart-like content |
| reading order for multi-column, repeated-header, and mixed-language content | mark decorative elements as artifacts and supply alternate text for meaningful images | reading-order review notes for representative pages |
Notatki przeglądu inżynierskiego dla tagged PDF accessibility structure
Użyj tych notatek przeglądu, aby upewnić się, że funkcja wyszła poza demonstrację i da się ją obronić podczas wydania, wsparcia i eskalacji klienta.
- Decyzja: heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping. Punkt nacisku implementacji: tag content as it is emitted so page geometry and structure stay aligned. Dowody akceptacji: reading-order review notes for representative pages. Wyzwalacz regresji: images with text may need both alternate text and source-data access
- Decyzja: alternate text ownership for charts, logos, signatures, and decorative images. Punkt nacisku implementacji: mark decorative elements as artifacts and supply alternate text for meaningful images. Dowody akceptacji: PDF/UA diagnostic report and remediation decisions. Wyzwalacz regresji: visual headers repeated on every page should often be artifacts
- Decyzja: reading order for multi-column, repeated-header, and mixed-language content. Punkt nacisku implementacji: validate PDF/UA-related diagnostics and inspect reading order manually. Dowody akceptacji: structure tree summary, role map, heading order, table structure, and artifact count. Wyzwalacz regresji: tables need header relationships, not only drawn grid lines
- Decyzja: validation profile and manual review process for generated samples. Punkt nacisku implementacji: keep accessible reference samples for every report template family. Dowody akceptacji: alternate text coverage for figures and chart-like content. Wyzwalacz regresji: multi-column pages can read incorrectly if tags follow drawing order
- Decyzja: heading levels, paragraphs, lists, tables, figures, artifacts, and role mapping. Punkt nacisku implementacji: build a semantic outline in parallel with visual layout. Dowody akceptacji: reading-order review notes for representative pages. Wyzwalacz regresji: images with text may need both alternate text and source-data access
- Decyzja: alternate text ownership for charts, logos, signatures, and decorative images. Punkt nacisku implementacji: tag content as it is emitted so page geometry and structure stay aligned. Dowody akceptacji: PDF/UA diagnostic report and remediation decisions. Wyzwalacz regresji: visual headers repeated on every page should often be artifacts
Przypadki brzegowe
- visual headers repeated on every page should often be artifacts
- tables need header relationships, not only drawn grid lines
- multi-column pages can read incorrectly if tags follow drawing order
- images with text may need both alternate text and source-data access
Delphi / C++Builder notes
PDFlibPas should sit behind a small service boundary that receives files, streams, profiles, and credentials, then returns output paths, warnings, metrics, and validation status. Important terms include tagged PDF, structure tree, role map, alternate text, artifact, reading order.
Przykład kodu Delphi
Poniższy szkic Delphi pokazuje praktyczną granicę usługi dla tego tematu. Kontrole zasad, logowanie i walidację trzymaj poza wąskim blokiem wywołań produktu, aby przepływ pozostał testowalny.
procedure InspectTaggedStructure(const FileName: string);
var
Pdf: TPDFlib;
begin
Pdf := TPDFlib.Create;
try
Pdf.LoadFromFile(FileName, '');
FTagReport := BuildStructureTreeReport(Pdf);
RequireAltTextForFigures(FTagReport);
RequireLogicalReadingOrder(FTagReport);
finally
Pdf.Free;
end;
end;
Lista produkcyjna
- Uruchom przepływ pracy na pustym pliku, zwykłym pliku klienta i pliku z najgorszego scenariusza
- Otwórz wygenerowany plik PDF w docelowej przeglądarce, walidatorze, drukarce lub aplikacji nadrzędnej
- Zaloguj wersję produktu, wersję profilu, hash wejścia, ścieżkę wyjścia, czas wykonania i liczbę ostrzeżeń
- Przechowuj hasła, certyfikaty, pliki tymczasowe i dane klienta zgodnie z jednoznacznymi zasadami retencji
- Dodaj dokument regresyjny, gdy plik klienta ujawni nowy przypadek brzegowy
Dokumentacja produktu
Dodatkowe przykłady kodu
Lib.BeginTag('Table', '', '');
Lib.BeginTag('TR', '', '');
Lib.BeginTagEx2('TH', '', '', '', '', 'col-part', '');
Lib.SetStructElemScope('Column'); // valid only while this TH is open
Lib.DrawText(72, 120, 'Part');
Lib.EndTag;
Lib.BeginTagEx2('TH', '', '', '', '', 'col-torque', '');
Lib.SetStructElemScope('Column');
Lib.SetStructElemColSpan(2); // header spans the value and unit columns
Lib.DrawText(200, 120, 'Tightening torque');
Lib.EndTag;
Lib.EndTag;
Lib.BeginTag('TR', '', '');
Lib.BeginTag('TD', '', '');
Lib.SetStructElemHeaders('col-part'); // explicit binding for irregular tables
Lib.DrawText(72, 140, 'M8 flange bolt');
Lib.EndTag;
Lib.EndTag;
Lib.EndTag; // Table