AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Editores / Editor de reportes / Principios
  • Overview
  • Printing a report created with the report editor
  • Printing a report in PDF format
  • Remarks
  • Examples
  • Printing a programmed print
  • Printing a WLanguage print in PDF format
  • Remarks
  • Examples
  • Printing a PDF from the report viewer
  • Principle
  • Event "Before printing the report again"
  • Notes and limitations
  • Remarks
  • General advice
  • Availability of controls in the reports
  • Control in RTF
  • PDF in the background of a report
  • Print in PDF/A-1b format
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to create a PDF file during a print.
This PDF file can be created:
  • WINDEVWEBDEV - Código ServidoriPhone/iPad from a report created in the report editor.
  • from a print performed with the WLanguage functions.
  • WINDEVReportes y Consultas by the end user via the report viewer
AndroidWidget Android iPhone/iPadJava Remarks:
  • AndroidWidget Android Java Only the prints performed through programming and in PDF format are available. No print can be performed via the report editor.
  • iPhone/iPad Only the prints in PDF format are available (report print or print performed through programming).
WINDEVWEBDEV - Código ServidoriPhone/iPad
Printing a report created with the report editor

Printing a report in PDF format

To print a report in PDF format:
  1. Create the requested report in the report editor.
  2. In the print process of the report in PDF format:
    • Configure the options for printing in PDF format with iParameterPDF. You can define:
      • the password used to open the PDF file.
      • the options for compressing images.
      • the options for the presence of bookmarks.
      • the options for protecting the PDF file. You also have the ability to define the password used to modify these protection options.
      • the use of the Unicode format.
      • WINDEVWEBDEV - Código Servidor the use of the PDF/A format (the generated version is PDF/A-1b).
    • Define the report destination with iDestination. In this case, the report must be printed in PDF format (iPDF or iGenericPDF constant).
    • Start printing the report in PDF format with iPrintReport.

Remarks

  • The order in which iDestination and iParameterPDF are used is not important.
  • WINDEVWEBDEV - Código Servidor You have the ability to sign the generated PDF file via the Signature control.
  • WINDEVWEBDEV - Código Servidor If the report must be printed in PDF/A format, you have the ability to enable the UI errors specific to this format:
    1. Open the report description (select "Report description" in the context menu).
    2. On the "Options" tab, check "Activar errores específicos de la exportación PDF/A-1b y PDF/A-3b".
    3. Validate the description window of the report and save the report. The errors are displayed in the "Compilation errors" pane.
  • iPhone/iPad If necessary, the created PDF file can be printed from the device by iPrintPDF. This function allows you to use the native system window to configure the file print.
  • iPhone/iPad The generated PDF file can be directly opened by ShellExecute.

Examples

iDestination(iPDF)
iPrintReport(RPT_MyPDFReport)
iDestination(iPDF)
// Protect the PDF file against printing 
// and against selection and copy/paste 
// No password to open the PDF file
// Password for modifying the protection settings
iParameterPDF(iProtectionPrinting + iProtectionSelection, "", "Protection")
// Print the report
iPrintReport(RPT_MyPDFReport)
Printing a programmed print

Printing a WLanguage print in PDF format

To perform a WLanguage print in PDF format:
  1. Define the destination of the print and the parameters of the PDF file to be generated with:
    • iDestination to define the print in PDF format (iPDF or iGenericPDF constant).
    • iParameterPDF to configure the options for printing in PDF format. You can define:
      • the password used to open the file.
      • the options for compressing images.
      • the options for the presence of bookmarks.
      • the options for protecting the PDF file. You also have the ability to define the password used to modify these protection options.
      • WINDEVWEBDEV - Código Servidor the use of the PDF/A format (the generated version is PDF/A-1b).
  2. Use the print functions to define the content of the print.
  3. Start the print job with iEndPrinting.

Remarks

  • The order in which iDestination and iParameterPDF are used is not important.
  • WINDEVWEBDEV - Código Servidor You have the ability to sign the generated PDF file with iPrintSignature. This function must be used at the same time as the print functions.
  • AndroidWidget Android iPhone/iPad If necessary, the created PDF file can be printed from the device by iPrintPDF.
    • iPhone/iPad This function allows you to use the native system window to configure the file print.
    • AndroidWidget Android This function allows you to print the file by using the Cloud Print service of Google.
  • AndroidWidget Android iPhone/iPad The generated PDF file can be directly opened by ShellExecute.
  • AndroidWidget Android PDF printouts support only standard Adobe fonts (not Unicode): Courrier, Helvetica, Times, Symbol and ZapFDingbats.

Examples

// Create the PDF file
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
// Print code
iCreateFont(1, 16, iBold, iRoman)
//Call to procedures used to print the content
PrintTitle()
PrintText()
// End of print and close the created PDF file
iEndPrinting()
WINDEVWEBDEV - Código Servidor
// Protect the PDF against printing
// and against selection and copy/paste
// No password for opening the PDF file
// Password for modifying the protection settings
iParameterPDF(iProtectionPrinting + iProtectionSelection, "", "Protection")
// Create the PDF file
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
// Print code
iCreateFont(1, 16, iBold, iRoman)
//Call to procedures used to print the content
PrintTitle()
PrintText()
// End of print and close the created PDF file
iEndPrinting()
WINDEVReportes y Consultas
Printing a PDF from the report viewer

Principle

In the WINDEV applications, the end user can choose the print mode from the report viewer. They can choose to print in PDF format if the "PDF" option is available in the "Export" pane of the report viewer.
In this case, the options defined by iParameterPDF are automatically taken into account.

Event "Before printing the report again"

The event "Before printing the report again" allows you to know the report print mode chosen by the user. In this event, you can configure the PDF file generation options according to the choices made by the user.
Example: When printing via the report viewer, the following code opens a window to request the password of the PDF file to be generated:
// -- Event Before printing the report again
IF iDestination = iPDF THEN
sPassword is string = Open(WIN_PDFSetting)
iParameterPDF(sPassword)
END
Notes and limitations
WINDEVWEBDEV - Código Servidor

Remarks

Several functions specific to the management of PDF files are also available. For more details, see PDF file functions.

General advice

For a better rendering, use TrueType or OpenType fonts.
Caution: OpenType fonts are not embedded in the generated PDF.. These fonts must be installed on the user computer to get a correct rendering.

Availability of controls in the reports

The following controls are not available:
  • LinuxiPhone/iPad RTF control
  • iPhone/iPad Edit control
  • LinuxiPhone/iPad Signature control
  • iPhone/iPad Organizer control
  • iPhone/iPad Scheduler control
  • LinuxiPhone/iPad Gantt Chart control
  • LinuxiPhone/iPad Pivot Table control
  • iPhone/iPad Spreadsheet control
  • LinuxiPhone/iPad HTML control
  • Chart control: Only Chart controls created from version 17 onwards are available..

Control in RTF

General limitations:
  • The static control in RTF may be truncated during a page break.
  • The arrays found in an RTF control are not printed.
  • The images used in the RTF controls are not printed.
iParameter associated with the "RTFWINDOWS=NO" parameter or with the iRTFWithImagesAndTables constant is used to properly print the tables and images found in RTF controls.
LinuxiPhone/iPad The RTF controls and the RTF options are not available.
LinuxiPhone/iPad

PDF in the background of a report

A PDF cannot be used in background image of the report.
WINDEVWEBDEV - Código Servidor

Print in PDF/A-1b format

  • The transparency of images is not supported:
    • If the image contains a transparent background in its format, the image will be drawn on a white background.
    • If the "Transparent magenta" color is used, the image rendering may differ in the generated PDF.
  • The "Opentype" fonts are not supported because the "Opentype" fonts cannot be incorporated in the generated PDF.
  • All fonts use must be incorporated in the generated PDF and they must contain all displayed characters.
    • In Windows, if characters are missing, the substitution font used is "Arial Unicode ms".
    • In Linux, if characters are missing, an error is displayed.
Tip: How do I know if the printout in PDF/1-1b format will be correct?
  • If the print is performed from a report, you have the ability to enable the GUI errors specific to this format ("Options" tab in the description window of the report, "Enable the errors specific to the PDF/A-1b export" option).
  • During a dynamic audit, the errors specific to the PDF/A-1b management are detected and displayed.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local