DocumentCacheGetOrAddPdf Method

Gets or adds the PDF cache file. This method handles the first step of the conversion: Source -> PDF.

Normally you would not need to call this method directly because calling only PreCacheDocument(FileProvider, DocumentCacheOptions) method handles the conversion chain: Source -> PDF -> XPZ.

Definition

Namespace: GleamTech.DocumentUltimate.Caching
Assembly: GleamTech.DocumentUltimate (in GleamTech.DocumentUltimate.dll) Version: 7.2.0
C#
public FileCacheItem GetOrAddPdf(
	DocumentCacheInfo cacheInfo,
	string attachmentPath = null
)

Parameters

cacheInfo  DocumentCacheInfo
The cache info for a document.
attachmentPath  String  (Optional)
The name or nested path of the attachment inside PDF Portfolio file to extract and generate PDF for.

The attachment name can be specified as the file name e.g. "File.docx" or the internal key (unique fileSpec key in PDF) for the attachment e.g "<2>File.docx". Nested attachments can be accessed with "|" separator e.g. "FirstLevel.msg|SecondLevel.docx" or "<0>FirstLevel.msg|<2>SecondLevel.docx"

Not common but attachment name in a PDF, can also have folder information e.g. "Subfolder/File.docx". Internal id for the attachment will not have direct folder information but for example "<2>" in <2>File.docx" specifies PDF internal folder id.

Return Value

FileCacheItem
A FileCacheItem instance for the cached PDF file, this object contains information like cache key.

See Also