Syntax 4: for importing DataWindowChild to PDFDocument
Description
Imports data from a DataWindowChild object to a PDF document. All
pages are inserted before the specified position of the new 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 (DataWindowChild dwc, long targetIndex) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the PDFDocument object in which you want to |
|
dwc |
The DataWindowChild object whose data is imported to a |
|
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 DataWindowChild object
ldwc_child before the first page of a PDF document and saves the
document as datawindowchild.pdf:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
DataWindowChild ldwc_child PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument dw_2.settransobject( sqlca) dw_2.retrieve( ) dw_2.getchild( "lname",ldwc_child) ll_return = lpdf_doc.importdatawindow( ldwc_child,1) ll_return1 = lpdf_doc.save("D:datawindowchild.pdf" ) destroy lpdf_doc |
See also