|
|
2. How can I integrate the PDF Generator in Oracle Forms?As any other java bean is integrated in Oracle Forms designer. Place the jar file in the designer's classpath and it will be automatically detected by the Oracle Forms Designer. You can add it after that easily as a bean area.
3. Available methods accessible directly from the sferyx.administration. pdfgenerator. PDFGeneratorOracleBean - you should use the same rules for accessing those methods as described above in the OracleForms PL/SQL script examples:public void generatePDF(java.lang.String sourceURL, java.lang.String destinationFile) -Generates a pdf file from given URL and saves it to a given filename using default paper size and orientation publiv void generatePDFFromContent(java.lang.String content, java.lang.String destinationFile, java.lang.String standardPageFormat, java.lang.String orinetation) - Generates a pdf file from given html/text content and saves it to a given filename, using paper size and paper orientation such as LANDSCAPE or PORTRAIT public void generatePDFFromReport(java.lang.String sourceURL, java.lang.String standardPageFormat, java.lang.String orinetation) - Generates a pdf file from given URL and saves it to temporary file showing the ready PDF document into the available PDF viewer public void generatePDFFromURL(java.lang.String sourceURL, java.lang.String destinationFile, java.lang.String standardPageFormat, java.lang.String orinetation) - Generates a pdf file from given URL and saves it to a given filename using paper size and orientation public void
generatePDFFromRTFURL(String sourceURL, String destinationFile,String
standardPageFormat, String orientation) - Generates pdf
automatically for given URL source containing Rich Text Format RTF file.
It will generate the file using the given standard page format string
such as "A4", "Letter" etc. and and save the file to the given File and
page oriantation such as "Portrait" or "Landscape". You can also set the
page margins using the method setMarginsForStandardPageFormat public void clearReportParameters() - Clears all the report parameters set previously using addReportParameter. public void openContentBuffer() - Opens the new content buffer for inserting content inside the PDF Generator. This should be used in conjunction with closeBufferAndGeneratePDF() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. public void appendContentToContentBuffer(String content) - Appends new string to existing content buffer. This should be used in conjunction with openContentBuffer() and closeBufferAndGeneratePDF(). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. public void closeBufferAndGeneratePDF(String destinationFile,String standardPageFormat, String orinetation) - Closes the existing content buffer and inserts its content inside the PDF Generator. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. OR public String closeBufferAndGenerateTempPDFFile(String standardPageFormat, String orinetation) - Closes the existing content buffer and inserts its content inside the PDF Generator and generates a temporary file where the PDF file is saved - the name of the temp file is returned as a result from the method. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual. public void setScaleToFitWidth(boolean scale) - Indicates whether to rescale the page in order to fit the given PageFormat - the default is true public void setOpenGeneratedFileInPDFViewer(boolean show) - Indicates whether to automatically open the default PDF Viewer and show the generated file or not. The default is true public void setMarginsForStandardPageFormat(int top, int bottom, int left, int right) - Sets the margins to be used when the page format is set using the standard string like "A4" or "Letter" - this values will not be considered it PageFormat object is used to set the page format public void setCharset(String charSet) - Sets the character set to be used. The default one is supporting the majority of the western latin languages. If you would like to support any other language you must specify "utf-8" as character set to be used - this will cause also all the TTF fonts used inside the document to be embedded into the resulting PDF file. public void
setHeader(String content) -
Generates the header for each page in the document. The parameter
content can be any plain text or HTML string - it will be parsed and
rendered as a header on the pages. You can includes any HTML element
such as images, tables, colors etc. Keep in mind to adjust the top
margin in order to make enough room for the header if necessary. public void setTTFFontFolderName(java.lang.String folderName) - sets the absolute path to the folder which contains the TrueType fonts to be used when generatiing the PDF documents. Please make sure that this feature is enabled by setting the character set to UTF-8 public java.lang.String getTTFFontFolderName() - returns the name of the True Type fonts if previously set. Otherwise it will return null and for the generation of the PDF files will be used the system font folders. void setDoNotBreakListsAcrossPages(boolean disablebreak) - if set to true, the PDFGenerator will try to not break list elements when page break is encountered if the list is not longer than the page height. void setDoNotBreakTablesAcrossPages(boolean disablebreak) - if set to true, the PDFGenerator will try to not break tables when page break is encountered if the table is not longer than the page height. java.lang.String closeBufferAndGeneratePDFSynchronously(java.lang.String destinationFile, java.lang.String standardPageFormat, java.lang.String orinetation) - closes the existing content buffer and inserts its content inside the PDF Generator. boolean isDoNotBreakListsAcrossPages() - returns whether the PDFGenerator should not allow to the lists to break across the pages boolean
isDoNotBreakTablesAcrossPages() -
returns whether the PDFGenerator should not allow to the tables to break
across the pages Here is also some simple example on how to use the content buffer for generating large PDF documents in Oracle Forms: FBEAN.INVOKE('block_control.PDFGenerator', 1, 'openContenBuffer'); FBEAN.ADD_ARG(hArgs, 'c:\test.pdf');
4. Data transfer from CLOB to PDFGenerator and generation of the pdf fileThis example uses some table names and columns which you will need to adapt the query in the example to your environment or create the same tables INSERT INTO PDFGENERATOR FROM CLOB AND GENERATE THE PDF FILE
5. Screen illustrating the setting of the properties inside the Oracle Forms builderYou can note on the screenshot below the bean implementation property of the Bean Area is set to sferyx. administration. pdfgenerator. PDFGeneratorOracleBean: |
|
6. Can I generate full Rich Text Oracle Reports with the PDF Generator in Oracle Forms?The Sferyx PDF Generator for Oracle Forms is a new product which resolves exactly this problem - it allows a fully formatted rich text generation of Oracle Reports in PDF from Oracle forms - it is capable of rendering everything inside the report - images, text, tables, lists - anything done automatically and exported in PDF. It works with all existing oracle reports and oracle forms and is quite simple to use. Furthermore you can use it to generate any kind of PDF documents directly from Oracle Forms using the available API. 7. How to generate a report with the PDF Generator in Oracle Forms?You can generate easily full rich text reports from existing Oracle Reports by following the examples and the guidelines below: The PDFGenerator gives you the possibility to create PDF files from existing reports by supplying the report URL as a parameter to the PDFGenerator which has been embedded inside an sample Oracle Form. Declare please consult the available examples in the folder "examples/oracleforms" for major details. There are the following cases when generating reports with the PDFGenerator:
1) In the Oracle Reports Builder, for the field containing the HTML code you should set the property "Contains HTML Tags" to "NO" 2) In the Oracle Reports Builder, for the field containing the HTML code you should set the property "CSS Class Name" - "sferyx_pdf_generator" - please write this as you see it in small case without trailing spaces. After that you can generate the report as specified in the examples.
1) Use the method
generatePDFFromURL instead of generatePDFFromReport 2) At the end of the URL
pointing to the report, you should append the parameter &pagesize=8.5x512
so it becomes something like where report_string is as follows: report_string:='report='||:report_name||'&userid='||user_name||'/'||pass_word||'@'||d_base||'&execution_mode=batch&comm_mode=synchronous
If you experience difficulties in configuring the parameters specified above, do not hesitate to contact support@sferyx.com for further help. If you need major flexibility and control over the PDF generation you can consult the various methods available below in order to construct the necessary content and PDF files dynamically.
|
All Sferyx products are assured with continuous e-mail support. With the retail products is included in the price 30 days startup support. Additionally, you can purchase annual support subscription tickets from our web store. Sferyx offers also a wide range of customization services for its products in order to satisfy any customer requirement. We can adapt our products to fit the customer needs and any kind of integration requirements. We execute also express developments, customization under request, development of new features on demand. You can request a quote at sales@sferyx.com or support@sferyx.com indicating your requirements and the terms of delivery.
|
Copyright © 2001-2024 Sferyx Srl. All rights reserved. Sferyx and the Sferyx logo are
registered trademarks of Sferyx Srl. http://www.sferyx.com |