Syntax 6: for importing DataStore to PDFDocument
Description
Imports data from a DataStore object to a PDF document. All pages
are inserted before the specified position of the PDF document, and if
the index of the specified position is out of range, the pages are added
to the end. The PDF output is the same as you save data from a
DataWindow object to a PDF document using PDFlib or GhostScript
(depending on which one is set as the default method).
Applies to
PDFDocument object in Objects and Controls
Syntax
|
1 |
objectname.ImportDataWindow (DataStore ds, long targetIndex) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the PDFDocument object in which you want to |
|
ds |
The DataStore object whose data is imported to a PDF |
|
targetIndex |
The target index of a PDF document before which you want |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an
error occurs. For more errors, see the Error Codes.
Examples
This statement imports all pages from the DataStore object lds_1
before the first page of a PDF document and saves the document as
datastore1.pdf:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
DataStore lds_1 PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument lds_1 = Create DataStore lds_1.dataobject = "d_emp" lds_1.settransobject(sqlca) lds_1.retrieve() ll_return = lpdf_doc.importdatawindow( lds_1,1) ll_return1 = lpdf_doc.save( "D:datastore1.pdf") destroy lpdf_doc destroy lds_1 |
See also