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 / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de impresión
  • Managing the PDF/A 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
Defines the options for the generated PDF file. 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.
  • the file format (Unicode, PDF/A).
From version 27, you can define all the PDF file generation options using pdfParameter variables.
These settings are applied when printing a PDF file (file generated from the report viewer, or directly with iDestination).
Ejemplo
// Display two full pages with scrolling and cover page
Params is pdfParameter
Params.Quality = iHighQuality
Params.Zoom = zoomFullWidth
Params.PageDisplayMode = dispTwoPage + dispEnableScrolling + dispWithCoverPage
iParameterPDF(Params)
iDestination(iGenericPDF)
iPrintReport(MyReport)
 
ShellExecute(iLastFile())
// 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)
PrintTitle()
PrintText()
// End of print and close the created PDF file
iEndPrinting()
// No protection on the generated document
// Maximum image quality
iParameterPDF("", "", iMaximumQuality)

// Create the PDF file
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
// Print code
iCreateFont(1, 16, iBold, iRoman)
PrintTitle()
PrintText()
PrintImage()
// End of print and close the created PDF file
iEndPrinting()
Sintaxis

Configuring the PDF file via a pdfParameter variable Ocultar los detalles

iParameterPDF(<Parameters>)
<Parameters>: pdfParameter variable
Name of the pdfParameter variable that describes all the options of the PDF file to be generated. This variable can be used to specify the format of the generated PDF file.

Protecting the PDF file by a password Ocultar los detalles

iParameterPDF(<Password> [, <Protection password>] [, <Quality and bookmark>])
<Password>: Character string or Secret string
  • Password used to open the PDF file,
  • Empty string if no password must be used.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
AndroidWidget Android Las cadenas secretas no están disponibles para este parámetro en las aplicaciones widget de Android/Android.
<Protection password>: Optional character string or secret string
Password used to change the protection options of the PDF file.
Note: The PDF standard only supports passwords containing characters from the unaccented Latin character set. This means that accents, Chinese and Russian characters are not supported.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
AndroidWidget Android Las cadenas secretas no están disponibles para este parámetro en las aplicaciones widget de Android/Android.
<Quality and bookmark>: Optional Integer constant (or combination of constants)
Configures:
  • Compression level of colors and grayscale.
  • Management of bookmarks.
  • Management of Unicode format.
iAutomaticQualityCompression level automatically calculated to generate a better-quality PDF file (especially for images).
Linux This constant is not available.
iAverageQualityAverage compression level.
Linux This constant is not available.
iBookmarkNoneNo bookmark is taken into account by the PDF file.
iBookmarkPageThe bookmarks are taken into account by the PDF file. A bookmark is automatically defined for each page in the PDF file. Each bookmark has a name in the following format "Page <page number>" (e.g. "Page 1").
iHighQualityLow compression level used to get a high quality for the generated PDF.
Linux This constant is not available.
iLowQualityHigh compression level.
Linux This constant is not available.
iMaximumQualityMinimum compression level to get a maximum quality. This constant is recommended when creating a PDF file intended to be printed.
Linux This constant is not available.
iMinimumQualityMaximum compression level. The quality will be minimum. This constant can be used to create a PDF file intended to be viewed on the screen.
Linux This constant is not available.
iPDFGrayscalePDF file generated in black and white.
Linux This constant is not available.
iPDFUnicodePDF in Unicode format.
Remarks:
  • The use of this constant is recommended if the characters found in the PDF file are wrongly encoded.
  • If this constant is used, the size of the generated PDF file will increase significantly.
AndroidWidget Android Not available.

Selecting the protection options Ocultar los detalles

iParameterPDF(<Protection options> [, <Password> , <Protection password>] [, <Quality and bookmark>])
<Protection options>: Integer constant (or combination of constants)
Format and requested protection:
iPDFA3bPDF in PDF/A-3b format:
  • All the elements required to display or print the PDF file are included in the generated file. Therefore, the generated file is bigger.
  • You can add files in various formats (XML, CSV, spreadsheets, word processing, etc.) to the PDF file. This can be done via iAddAttachment.
Note: This option is only taken into account for the current print job.
Note: This format has certain limitations:
  • Transparency of images not supported.
  • OpenType fonts not supported.
  • Use of embedded fonts.
For more details, see Managing the PDF/A format.
iPhone/iPadIOS WidgetMac Catalyst This constant is not available.
iPDFA
or
iPDFA1b
PDF in PDF/A-1b format. All the elements required to display or print the PDF file are included in the generated file. Therefore, the generated file is bigger.
Note: This option is only taken into account for the current print job.
Note: This format has certain limitations:
  • Transparency of images not supported.
  • OpenType fonts not supported.
  • Use of embedded fonts.
For more details, see Managing the PDF/A format.
iPhone/iPadIOS WidgetMac Catalyst This constant is not available.
iPDFGrayscalePDF file generated in black and white.
iPDFUnicodePDF in Unicode format
LinuxAndroidWidget Android iPhone/iPadIOS WidgetMac Catalyst This constant is not available.
iProtectionCommentRestricts adding or editing comments.
iProtectionModificationThe content of the PDF file cannot be modified.
iProtectionNoneNo protection for the PDF file.
iProtectionPrintingThe PDF file cannot be printed.
iProtectionSelectionThe content of the PDF file cannot be copied or extracted from the file.
<Password>: Optional character string or secret string
  • Password used to open the PDF file,
  • Empty string if no password must be used.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
AndroidWidget Android Las cadenas secretas no están disponibles para este parámetro en las aplicaciones widget de Android/Android.
<Protection password>: Optional character string or secret string
Password used to change the protection options of the PDF file.
If this password corresponds to an empty string (""), a password is automatically generated.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
AndroidWidget Android Las cadenas secretas no están disponibles para este parámetro en las aplicaciones widget de Android/Android.
<Quality and bookmark>: Optional Integer constant (or combination of constants)
Configures:
  • Color and grayscale compression quality.
  • Management of bookmarks.
  • Management of Unicode format.
iAverageQualityAverage compression quality
Linux This constant is not available.
iBookmarkNoneNo bookmark is taken into account by the PDF file
iBookmarkPageThe bookmarks are taken into account by the PDF file. A bookmark is automatically defined for each page in the PDF file. Each bookmark has a name in the following format "Page <page number>" (e.g. "Page 1").
iHighQualityHigh compression quality
Linux This constant is not available.
iLowQualityLow compression quality
Linux This constant is not available.
iMaximumQualityMaximum compression quality
Linux This constant is not available.
iMinimumQualityMinimum compression quality
Linux This constant is not available.
iPDFUnicodePDF in Unicode format.
Note: Starting with version 21, this constant can be used in the <Protection options> parameter.
LinuxiPhone/iPadIOS WidgetMac Catalyst This constant is not available.
Observaciones
  • iParameterPDF is ignored in the middle of a print.
  • The configuration defined with iParameterPDF is enabled:
    • until the application or site is closed,
    • until the next call to iParameterPDF,
    • until the next call to iReset.
  • If PDF/A-1b is enabled via iParameterPDF before displaying the print preview:
    • The PDF export option changes from "PDF" to "PDF/A".
    • For all print jobs sent from the preview (direct printing, etc.), there will be the same limitations as for the export to PDF/A format: Image transparency, font substitution, etc.
  • By default, the generated PDF uses version 1.4. To generate the PDF file with a specific version, use a variable of type pdfParameter. You can use the Version property to set the version used for the generation.

Managing the PDF/A format

Limitations:
  • 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.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300prn.dll
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: 27/11/2024

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