 |
PdfDocumentConvertToPdfA Method |
Converts this document to the specified PDF/A conformance level. Valid only on
loaded documents — new documents bake conformance in via
PdfDocument(PdfStandard), and HtmlToPdf output sets it via
PdfStandard.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic void ConvertToPdfA(
PdfStandard pdfStandard
)
Public Sub ConvertToPdfA (
pdfStandard As PdfStandard
)
Parameters
- pdfStandard PdfStandard
- Target conformance level. Must be one of
PdfA, PdfA2B, or
PdfA3B. PDF/X and Full
are rejected.
Exceptions| Exception | Condition |
|---|
| PdfDocumentException | Thrown when called on a document that
is not a loaded document, when pdfStandard is not one of
the supported PDF/A levels, or when the conversion fails (for example when a
required font cannot be embedded). |
Remarks
The conversion walks every font descriptor, re-embeds / subsets where required
by the target profile, and writes the profile's XMP metadata + output intent.
Subsequent
Save(String) /
Save(Stream) emits the
conformant PDF. Typical cost: a few hundred ms for text-only documents; seconds
for image-heavy docs. Missing font programs are resolved from the host's installed
fonts (see
PdfSystemFonts). Validate the output with veraPDF or
Acrobat Preflight.
ExamplePdfDocument document = new PdfDocument("input.pdf");
document.ConvertToPdfA(PdfStandard.PdfA2B);
document.Save("archive.pdf");
document.Close();Dim document As New PdfDocument("input.pdf")
document.ConvertToPdfA(PdfStandard.PdfA2B)
document.Save("archive.pdf")
document.Close()
See Also