Function Reference
EnsureSVGDimensions
Ensures an SVG file has explicit width and height attributes on the root element. Apache FOP 2.8 (Batik) requires these to correctly determine intrinsic dimensions; without them the SVG viewport defaults to a square, causing dead space in PDF output. If width/height are missing but a viewBox is present, the viewBox width and height values are injected as unitless attributes. The file is modified in place (expected to be a temp-area copy).
Syntax:
wwimageinfo:EnsureSVGDimensions($svgFilePath)Parameters:
Name | Type | Description |
|---|---|---|
|
| Full pathname of the SVG file. |
Returns:
bool: True if the file already had dimensions or was successfully patched; false on error or if no viewBox exists.
GetInfo
Gets image information of file path: 'imageFilePath'.
Syntax:
wwimageinfo:GetInfo($imageFilePath)Parameters:
Name | Type | Description |
|---|---|---|
|
| Full pathname of the image file. |
Returns:
XPathNodeIterator: Image info node set.
MapPDFLinks
Map PDF links.
Syntax:
wwimageinfo:MapPDFLinks($fileTable, $fileToFix, $fileToWrite, $originalFilePath, $outputFilePath, $useAbsPath)Parameters:
Name | Type | Description |
|---|---|---|
|
| Node set of links to update. |
|
| The file to fix. |
|
| The file to write. |
|
| Full pathname of the original file. |
|
| Full pathname of the output file. |
|
| True to use abs path. |
MergePDFs
This merges a set of PDFs and/or PostScript files into one PDF.
Syntax:
wwimageinfo:MergePDFs($sourceFileList, $targetFilePath)
wwimageinfo:MergePDFs($sourceFileList, $fileTable, $targetFilePath)Parameters:
Name | Type | Description |
|---|---|---|
|
| List of source files. |
|
| Full pathname of the target file. |
|
| Node set of links to update. |
Returns:
bool: True if it succeeds, false if it fails.
PostScriptToPDF
Convert the specified PostScript file to a PDF.
Syntax:
wwimageinfo:PostScriptToPDF($postScriptFilePath, $pdfJobSettings, $pdfFilePath)Parameters:
Name | Type | Description |
|---|---|---|
|
| Full pathname of the post script file. |
|
| The PDF job settings. |
|
| Full pathname of the PDF file. |
Returns:
bool: True if it succeeds, false if it fails.
RasterizePostScript
Render a PostScript file to a known image format such as BMP, JPEG, PNG, or GIF.
Syntax:
wwimageinfo:RasterizePostScript($postScriptFilePath, $renderHorizontalDPI, $renderVerticalDPI, $renderWidth, $renderHeight, $targetImageFormatAsString, $targetImageColorDepth, $targetImageGrayscale, $targetImageTransparent, $targetImageInterlaced, $targetImageQuality, $targetFilePath)
wwimageinfo:RasterizePostScript($postScriptFilePath, $watermark, $renderHorizontalDPI, $renderVerticalDPI, $renderWidth, $renderHeight, $targetImageFormatAsString, $targetImageColorDepth, $targetImageGrayscale, $targetImageTransparent, $targetImageInterlaced, $targetImageQuality, $targetFilePath)Parameters:
Name | Type | Description |
|---|---|---|
|
| Full pathname of the post script file. |
|
| The render horizontal DPI. |
|
| The render vertical DPI. |
|
| Width of the render. |
|
| Height of the render. |
|
| Target image format as string. |
|
| Depth of the target image color. |
|
| True to target image grayscale. |
|
| True to target image transparent. |
|
| True if target image interlaced. |
|
| Target image quality. |
|
| Full pathname of the target file. |
|
| True to apply watermark to the output image. |
Returns:
XPathNodeIterator: Image info node set.
Transform
Create a new version of an image with a different format or with different dimensions.
Syntax:
wwimageinfo:Transform($inputImageFilePath, $outputImageFormat, $outputImageWidth, $outputImageHeight, $outputImageFilePath)
wwimageinfo:Transform($inputImageFilePath, $outputImageFormatAsString, $Choice_outputImageQuality_outputImageWidth, $Choice_outputImageWidth_outputImageHeight, $Choice_outputImageHeight_outputImageFilePath, $Choice_outputImageFilePath_outputResolution)
wwimageinfo:Transform($inputImageFilePath, $outputImageFormatAsString, $outputImageQuality, $outputImageWidth, $outputImageHeight, $outputImageFilePath, $outputResolution)Parameters:
Name | Type | Description |
|---|---|---|
|
| Full pathname of the input image file. |
|
| The output image format. |
|
| Width of the output image. |
|
| Height of the output image. |
|
| Full pathname of the output image file. |
|
| The output image format as string. |
|
|
Width of the choice output image quality output image. | | Choice_outputImageWidth_outputImageHeight | int | Height of the choice output image width output image. | | Choice_outputImageHeight_outputImageFilePath | string | Full pathname of the choice output image height output image file. | | Choice_outputImageFilePath_outputResolution | string | The choice output image file path output resolution. | | outputImageQuality | int | The output image quality. | | outputResolution | int | The output resolution. |
Returns:
XPathNodeIterator: Image info node set.