GetSVGFilterCapabilitiesJSON
Vector graphics, SVG, filter import
Description
Inspect SVG import filter support and finite processing limits
Syntax
Delphi
Function TPDFlib.GetSVGFilterCapabilitiesJSON: WideString;DLL
const wchar_t* DLGetSVGFilterCapabilitiesJSON(int InstanceID);
const char* DLGetSVGFilterCapabilitiesJSONA(int InstanceID);ActiveX
Function PDFlib::GetSVGFilterCapabilitiesJSON() As StringReturn values
Returns a JSON object describing the SVG import filters supported by this build and their processing limits.
Remarks
Returns a JSON capability description independent of the most recent conversion
Supported primitives are feGaussianBlur, feOffset, feFlood, feColorMatrix, feComposite, feMerge, feComponentTransfer, feMorphology, feConvolveMatrix, feDisplacementMap, feBlend and feTile
Component transfer supports identity, table, discrete, linear and gamma functions; convolution supports duplicate, wrap and transparent edge handling, optional alpha preservation and integral kernel targets; displacement uses bilinear premultiplied samples with straight map channels
SourceGraphic, SourceAlpha, previous output and case-sensitive named results are supported; working space defaults to linearRGB with inherited or per-primitive sRGB overrides, while displacement preserves its first input's colour space
Blend supports the SVG 1.1 normal, multiply, screen, darken and lighten modes using premultiplied channels and source-over result alpha; other blend modes remain explicit findings
Primitive subregions accept continuous numbers, percentages and px, pt, pc, in, cm, mm and q lengths in userSpaceOnUse or objectBoundingBox coordinates; absolute primitive lengths use 96 CSS pixels per inch, and default bounds follow referenced subregions, with standard inputs, flood, image, turbulence and tile defaulting to the whole filter region
Subregions clip primitive inputs and output, and named results retain their bounds; tile repeats the input subregion at its original origin in both directions, preserving transparent samples outside the stored filter image and clipping the repeated result to its own subregion
Positions and extents remain continuous and bounded to 1048576 filter pixels; zero extents produce transparent output, while negative or nonfinite values, unsupported relative units, separated number/unit tokens and numerically unqualified sampling are diagnosed
Convolution supports duplicate, wrap and none edges against the actual cropped input domain; positive one- or two-number kernelUnitLength values select sampling distances in primitive coordinates, while the default is one pixel of the local primitive grid
Each image dimension is limited to 2048 pixels, each filter to 64 primitives, each import to 64 filter invocations, cumulative image-buffer reservations to 512 MiB and estimated work to 268435456 operations; morphology radii are at most 64 pixels, convolution orders at most 15 per axis and transfer tables at most 256 values
Integral filterRes values select bounded raster dimensions; ordinary dimensions use twice the destination resolution; blur uses a three-box approximation and morphology uses integer pixel radii
Unsupported operations include background or paint inputs and animation; inspect per-import findings for actual use
The getter does not clear the latest error; DLL string storage belongs to the instance and is replaced by its next string-returning call, and the A variant follows the configured ANSI encoding mode
ActiveX exposes this method through IPDFlibrary16 and the default dispatch interface; Pascal Automation callers can use CoPDFlibrary.CreateConversionTools
The macOS Dylib exposes the same wide and A C entry points shown above using the C calling convention; string pointers belong to the instance and must be copied before the next string-returning call, and A variants follow the configured ANSI or UTF-8 mode
Bounded diffuse and specular lighting
feDiffuseLighting and feSpecularLighting use the input alpha as a height map and accept exactly one distant, point or spot light; positions, surface heights and sampling distances use the primitive coordinate system
Surface normals use the SVG boundary-aware Sobel kernels, including corners and edges; a single-pixel axis contributes zero slope, diffuse output is opaque and specular alpha is the maximum of its computed premultiplied RGB channels
lighting-color defaults to white without automatic inheritance, supports currentColor and explicit inherit, and is converted into the selected filter working colour space; a parsed colour alpha component does not scale illumination
Positive kernelUnitLength values establish a bounded implicit sampling grid; the input is bilinearly reconstructed on that grid, Sobel lighting is evaluated there and the result is reconstructed at the original resolution, with a partial final sampling cell retaining its rectangle coverage
Point lights use the local surface height without distance attenuation, and coincident point/surface samples contribute zero illumination; spot lights support direction, focus and a limiting cone with four-point coverage sampling, while undefined spot directions are diagnosed
Specular exponents range from 1 through 128, nonnegative lighting constants and spot exponents are bounded to 1000000, coordinates to 1073741824 and kernel spacing to at least 1e-12; the implicit grid remains limited to 2048 pixels per dimension and consumes the shared buffer and work budgets
Missing or multiple lights, unsupported children, animation, invalid colours, invalid sampling and exhausted budgets produce findings with strict page-output rollback; finite grid reconstruction and four-point cone coverage remain approximations, and fullFidelity stays false
Deterministic turbulence
feTurbulence supports turbulence and fractalNoise, one or two nonnegative baseFrequency values, truncated signed seeds, octave accumulation and stitch or noStitch tile behaviour in the primitive coordinate system
The seeded gradient sequence and interpolation follow the SVG 1.1 algorithm; four independent channels are generated in the selected filter working colour space, then RGB is premultiplied by the generated alpha before entering the pipeline
Stitching adjusts base frequencies using relative frequency change and applies the specified octave lattice wrapping against the original primitive subregion, including when the stored result is cropped; it does not redefine the function as a globally periodic sampler outside that subregion
The bounded profile accepts 0 through 12 octaves, baseFrequency values through 1000000 and seed magnitudes through 9007199254740991; scaled lattice coordinates at every octave are limited to 1073741824, with numeric underflow, nonfinite values and undefined zero-length seeded gradients diagnosed
Zero octaves or zero frequencies produce transparent turbulence and straight RGBA channels of 0.5 for fractalNoise; shared work is reserved before output allocation, so larger images or octave counts can reach the work limit before the maximum dimension limit
Bounded filter image resources
feImage accepts local SVG graphic fragments and base64 PNG or JPEG data URIs; href takes precedence over xlink:href, and standalone raster images use preserveAspectRatio with xMidYMid meet by default, none for stretching and slice for clipped filling
Local graphic fragments use referenced graphic content without moving or changing the source DOM; symbol references require a qualified viewBox, use graphs are bounded and cycles, executable or animated fragments and unsupported target types are diagnosed
Local image files require the explicit DrawSVGEx option PDF_SVG_IMPORT_ALLOW_FILTER_IMAGE_FILES (2), independently of strict filter rejection (1); the option is reapplied on every call, including cached SVG documents, and network URLs, UNC paths, device paths and external SVG documents are unsupported
The file is read once with a byte limit, and the approved bytes are passed to the decoder without a second filename read; nested image nodes inside referenced graphics follow the same policy, while ordinary image nodes outside feImage retain their existing resource behaviour
PNG preflight checks chunk extents, CRC, dimensions, transparency layout and exact bounded scanline expansion, including Adam7 passes; JPEG preflight checks baseline or progressive 8-bit frame structure, quantization and Huffman tables, scan headers and exact container termination, with final rendering delegated to the native codec
Encoded data is limited to 16 MiB per resource and 64 MiB per conversion, decoded scanline or component data to 64 MiB per conversion, dimensions to 8192 and total pixels to 4194304; PNG ICC expansion is limited to 4 MiB, container segments to 10000 and JPEG scans to 64
Active image references are limited to 32 levels, use graphs to 64 levels and 100000 visited nodes; source decoding and temporary storage also consume the shared filter work and 512 MiB buffer reservation
The native private SVG rasterizer preserves source alpha and uses bilinear image sampling with edge extension to prevent a transparent border from reducing the opacity of a scaled image; vector fragments still use the native finite-resolution renderer, and fullFidelity remains false
Continuous filter domains and sampling
Each primitive result has a continuous domain and a bounded local raster grid; referenced inputs are resampled in premultiplied working colour space, and coincident domains and grids preserve exact samples
The final result is mapped to the filter output using rectangle overlap coverage and premultiplied bilinear sampling; repeated identity operations do not multiply the same fractional boundary coverage again
Named results retain both stored domains and original subregion bounds, so tiling preserves fractional origins and periods and leaves samples outside stored input transparent; offset and convolution distances use the same local-grid coordinate model
Blur remains a three-box approximation and morphology uses local integer radii; bilinear finite-grid resampling is a bounded reconstruction model rather than a claim of resolution-independent analytic equivalence, and fullFidelity remains false
Local filter inheritance
Filters may reference another filter in the same SVG fragment with href or xlink:href; nearer attributes override referenced attributes, and the nearest filter with its own filter primitives supplies the complete primitive list
Resolution uses a private attribute view and leaves the source DOM and primitive ownership unchanged; inherited raster settings and working colour space remain effective across repeated rendering
References are local fragments only and do not load files or network resources; missing or non-filter targets, cycles, more than 32 chain nodes, more than 128 children or attributes per chain node, attribute values above 65536 UTF-16 units and references above 4096 UTF-16 units are diagnosed, with strict mode rejecting the import atomically