Imports data from a DataWindow object, a DataWindowChild object or a DataStore object to a PDF document.
For DataWindow objects
For DataWindowChild objects
For DataStore objects
Description
Imports data from a DataWindow object to a PDF document. All pages are added to the end of the PDF document. 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
Syntax
objectname.ImportDataWindow (DataWindow dw)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataWindow object to a PDF document |
dw |
The DataWindow object whose data is imported to a PDF document |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
Examples
This statement imports all pages from the DataWindow object dw_1 and saves the contents to a PDF document called datawindow.pdf:
PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument ll_return = lpdf_doc.importdatawindow( dw_1) ll_return1 = lpdf_doc.save( "D:\datawindow.pdf") destroy lpdf_doc
This statement uses Modify to set the PDF standard, and then imports all pages from the DataWindow object dw_1 and saves the contents to a PDF document called datawindow1.pdf using PDFA_1A! standard:
PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument dw_1.Modify ("DataWindow.Export.PDF.Method = NativePDF! ") dw_1.modify("DataWindow.Export.PDF.NativePDF.PDFStandard =1") ll_return = lpdf_doc.importdatawindow( dw_1) ll_return1 = lpdf_doc.save( "D:\datawindow1.pdf",PDFA_1A!) destroy lpdf_doc
See also
Description
Imports data from a DataWindow 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
Syntax
objectname.ImportDataWindow (DataWindow dw, long targetIndex)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataWindow object to a PDF document |
dw |
The DataWindow object whose data is imported to a PDF document |
targetIndex |
The target index of a PDF document before which you want to import all pages from a DataWindow object |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
Example 1
This statement imports all pages from the DataWindow object dw_1 before the first page of a PDF document and saves the document as datawindow2.pdf.
PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument ll_return = lpdf_doc.importdatawindow( dw_1,1) ll_return1 = lpdf_doc.save( "D:\datawindow2.pdf") destroy lpdf_doc
See also
Description
Imports data from a DataWindowChild object to a PDF document. All pages are added to the end of the PDF document. 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
Syntax
objectname.ImportDataWindow (DataWindowChild dwc)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataWindowChild object to a PDF document |
dwc |
The DataWindowChild object whose data is imported to a PDF document |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
Examples
This statement imports all pages from the DataWindowChild object ldwc_child and saves the contents to a PDF document called datawindowchild.pdf:
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) ll_return1 = lpdf_doc.save("D:\datawindowchild.pdf" ) destroy lpdf_doc
This statement uses Modify to set the PDF standard, and then imports all pages from the DataWindowChild object ldwc_child and saves the contents to a PDF document called datawindowchild2.pdf using PDFA_1B! standard:
DataWindowChild ldwc_child PDFDocument lpdf_doc long ll_return,ll_return1 lpdf_doc = Create PDFDocument //dw_2 is an object with DropDownDW edit style dw_2.settransobject( sqlca) dw_2.retrieve( ) dw_2.getchild( "lname",ldwc_child) ldwc_child.Modify ("DataWindow.Export.PDF.Method = NativePDF! ") ldwc_child.modify("DataWindow.Export.PDF.NativePDF.PDFStandard =2") ll_return = lpdf_doc.importdatawindow( ldwc_child) ll_return1 = lpdf_doc.save("D:\datawindowchild2.pdf",PDFA_1B! ) destroy lpdf_doc
See also
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
Syntax
objectname.ImportDataWindow (DataWindowChild dwc, long targetIndex)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataWindowChild object to a PDF document |
dwc |
The DataWindowChild object whose data is imported to a PDF document |
targetIndex |
The target index of a PDF document before which you want to import all pages from a DataWindowChild object |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
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:
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
Description
Imports data from a DataStore object to a PDF document. All pages are added to the end of the PDF document. 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
Syntax
objectname.ImportDataWindow (DataStore ds)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataStore object to a PDF document |
ds |
The DataStore object whose data is imported to a PDF document |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
Examples
This statement imports all pages from the DataStore object lds_1 and saves the contents to a PDF document called datastore.pdf:
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) ll_return1 = lpdf_doc.save( "D:\datastore.pdf") destroy lpdf_doc destroy lds_1
This statement uses Modify to set the PDF standard, and then imports all pages from the DataStore object lds_1 and saves the contents to a PDF document called datastore2.pdf using PDFA-1A! standard:
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() lds_1.Modify ("DataWindow.Export.PDF.Method = NativePDF! ") lds_1.modify("DataWindow.Export.PDF.NativePDF.PDFStandard =1") ll_return = lpdf_doc.importdatawindow( lds_1) ll_return1 = lpdf_doc.save( "D:\datastore2.pdf",pdfa_1a!) destroy lpdf_doc destroy lds_1
See also
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
Syntax
objectname.ImportDataWindow (DataStore ds, long targetIndex)
Argument |
Description |
---|---|
objectname |
The name of the PDFDocument object in which you want to import data from a DataStore object to a PDF document |
ds |
The DataStore object whose data is imported to a PDF document |
targetIndex |
The target index of a PDF document before which you want to import all pages from a DataStore object |
Return value
Long.
Returns 1 if the function succeeds and a negative value if an error occurs. If the return value is -1, there is a high possibility that the function failed to export PDF. You need to check if the setting of parameters is correct.
1 -- Success
-1 -- General error
-3 -- Invalid PDFDocument object
-4 -- Invalid PDFPage object
-13 -- The index is out of range
-15 -- Invalid PDFImportContent object
-16 -- The start index is out of range
-17 -- Invalid index range
-19 -- Invalid file name
-22 -- Invalid password. The master password and the user password cannot be empty, and they cannot be the same.
-23 -- Invalid PDFDocumentProperties object
-24 -- Invalid handle of PDFlib
-25 -- An exception occurred while executing the PDFlib operation
-26 -- Failed to open the PDF document
-27 -- Failed to create the PDF document
-32 -- The PDF object does not exist
-33 -- The object already has its owner
-34 -- The ReadOnly object is not allowed to be modified
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:
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