Debenu Quick PDF logo

StoreCustomDataFromFile

Document properties

Description

Saves custom data from a file into the PDF under a key name. This data can later be retrieved using RetrieveCustomDataToString or RetrieveCustomDataToFile. The storage type (string, stream or compressed stream) and location (Document Information Dictionary or Document Catalog) can be set. If the location is the Document Catalog any storage type can be used, but the key must have a special prefix assigned to you by Adobe. If the location is the Document Information Dictionary any key apart from the standard keys can be used, but only strings can be used.

Syntax

Delphi

function TDebenuPDFLibrary1811.StoreCustomDataFromFile(Key, FileName: WideString; 
  Location, Options: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::StoreCustomDataFromFile(Key As String,
  FileName As String, Location As Long, Options As Long) As Long

DLL

int DPLStoreCustomDataFromFile(int InstanceID, wchar_t * Key, wchar_t * FileName,
  int Location, int Options)

Parameters

Key The key to store the data under. If the location is the Document Information Dictionary then the key cannot be "Author", "Title", "Subject", "Keywords", "Creator" or "Producer". Any other key can be used but keys should be chosen with care so they make sense to the user. If the location is the Document Catalog then the key must have a special prefix assigned to you by Adobe to avoid conflicts with other software.
FileName The path and name of the file containing the data to store in the PDF under the specified key.
Location 1 = Store the data in the Document Information Dictionary
2 = Store the data in the Document Catalog
Options 0 = Store the data as a string (the only option available if the location is the Document Information Dictionary)
1 = Store the data in a stream
2 = Store the data in a compressed stream

Return values

0 The file containing the data could not be opened, or the Key parameter was invalid
1 The data was stored successfully

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport