PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Required configuration
  • How to directly open the PDF generated during a print job?
  • Printing reports in PDF format in Linux
  • Limitations: reports controls supported in Linux
  • Printing in WLanguage in Linux
  • Step 1: Configuring the print parameters
  • Step 2: Creating print fonts
  • Step 3: Printing characters, images
  • Step 4: Starting the print job
  • List of print functions available in Linux
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
WEBDEV and WINDEV allows you to print in PDF format in Linux with the WLanguage functions. You have the ability to perform:
  • WLanguage prints in PDF format.
  • prints of reports created with the report editor in PDF format.
The print is performed via the WLanguage functions like any other standard print.
This help page presents the limits for printing in Linux.

Required configuration

To use the print features in WEBDEV Linux, you must install:
  • the QT library (Core and GUI), version 5 or later.
    In Ubuntu, the QT library can be installed with the following commands:
    sudo apt-get install libqtcore5
    sudo apt-get install libqtgui5
  • the LibFreeType.so library (32 or 64-bit), version 6 or later.
    Caution: The PC SOFT framework searches for the libfreetype.so library. If only the libfreetype.so.6 file exists, you must create a symbolic link via the following command:
    ln -s /usr/lib/libfreetype.so.6 /usr/lib/libfreetype.so
Remark: You have the ability to install Microsoft fonts in Linux in order to get reports closer to their preview in Windows. In Ubuntu, these fonts can be added by following this procedure: http://doc.ubuntu-fr.org/msttcorefonts.
Remark: The following Linux distributions are supported:
  • Debian 5.02
  • Ubuntu 10.04

How to directly open the PDF generated during a print job?

To directly open the PDF document created for the print job, use the following commands:
xdg-open url
or
gnome-open url
Printing reports in PDF format in Linux
The different steps for printing reports in Linux are as follows:
  • Step 1: Configuring the print destination.
    This configuration is defined with iDestination. Only PDF printing is available in Linux. iDestination must be used with the PDF file generation constants (iPDF or iGenericPDF).
  • Step 2: Starting the print.
    The report is printed by iPrintReport.

Limitations: reports controls supported in Linux

The following controls are supported in a report printed in Linux:
  • Static control (the RTF type is not supported).
  • Calculated control.
  • Image control.
  • Preset control.
  • Shape control.
  • Internal Report control.
  • Link control.
  • Edit control.
  • Bar Code control.
  • Chart control.
  • Check Box control.
  • Organizer control.
  • Scheduler control.
  • Spreadsheet control.
The following controls are not supported:
  • RTF Static control.
  • Pivot Table control.
  • Gantt Chart control.
  • Signature control.
  • HTML Static control.
Printing in WLanguage in Linux
The steps for printing in WLanguage as are follows:

Step 1: Configuring the print parameters

This step is used to choose the print parameters for the document (quality, orientation).
This step is optional.
The different operations are as follows:
  1. Selecting the parameters for printing the document (iParameter). When printing in Linux, you have the ability to only configure the format of the page or its orientation.
  2. Re-defining the print margins (iMargin). The top, bottom, left and right margins can be modified. If this function is not called, the default margins (differ according to the selected printer) will be used.
Caution: The order of above-mentioned operations must be respected. If a print is in progress, iParameter cancels the current print.

Step 2: Creating print fonts

This step allows you to define and choose the different fonts that will be used in the printed document.
You can only choose fonts specific to the print: these fonts will be available when printing with the WLanguage functions.
This step is optional.
The default font is used if no font is specified for the print.
  • Font: Don't care
  • Font 0,
  • size: 12 pica,
  • normal style.
  • color: black
The print fonts are created by iCreateFont.
Remarks:
  • Only the TrueType fonts (*.ttf) can be used in Linux.
  • If fonts other than basic fonts must be used, they must be installed on the WEBDEV server (by using the directories of the distribution used). For more details, see the documentation of the distribution used.

Step 3: Printing characters, images

This step consists in "sending the different elements to print to the printer":
  • text,
  • images,
  • drawings, ...
The print in PDF (configured by iDestination) will be effective at the end of print (iEndPrinting).
Several WLanguage functions are used to print text, images, ... See the list of print functions that can be used in Linux for more details.
Remark: Printing images: JPEG, BMP, PNG and GIF images can be printed in Linux.

Step 4: Starting the print job

This step consists in starting the print job (iEndPrinting).
List of print functions available in Linux
The following print functions are available in Linux:
iBorderPrints a border at specified coordinates.
iRoundBorderPrints a border with rounded outlines at specified coordinates.
iChangeSubReportSourceModifies through programming the report associated with a sub-report in a composite report.
iConfigureReportConfigures the printer by opening the configuration window (WINDEV and WINDEV Mobile).
iCreateFontCreates a new print font.
iLastFileReturns:
  • the full name of the last file generated during the print (PDF, RTF, text, ...).
  • the list of created duplicate files.
iDestinationConfigures the print destination.
iEllipsePrints an ellipse (in a rectangle).
iSequencingAddAdds a report into a sequence of report prints.
iSequencingPrintPrints a sequence of reports.
iEscapeSends an ESCAPE command or a data command to a printer.
iWindowCancelConfigures the print cancel window..
iCloseReportStops printing the current report immediately.
iCurrentFileReturns the name of the file currently generated.
iEndReportForces the report print to stop.
iEndPrintingSignals the end of the document to print and actually starts printing the data stored in the printer spooler via the following functions: iPrint, iPrintImage, iNewLine, etc.
iForceComplementForces the printing of a Body Complement block.
iGroupAddAdds a report to a group of reports.
iGroupPrintStarts printing a report found in a group of reports.
iGroupConfigureModifies the parameters of a report found in a group of reports.
iNestedHeaderFooterPrints (or not) the page headers and footers of nested report.
iImageHeightCalculates the height of the image to print (in millimeters).
iPageHeightCalculates the height of printable page (in millimeters) while taking the top or bottom margins into account.
iPageHeightLeftCalculates the available height (in millimeters) left on the current page while taking into account the defined margins (top or bottom).
iTextHeightCalculates the height of the font for the text to print (in millimeters).
iAreaHeightCalculates the height of a fixed-width area required to print the entire text that uses the current font.
iDocumentCanceledUsed to find out whether the current print was canceled by the user.
iDocumentPrintedAllows you to find out whether the user has requested to print the document from the report viewer.
iPrintSends the character string passed as parameter to the print buffer.
iPrintBlockForces a report block to print.
iPrintBarCodePrints a bar code (inside a rectangle).
iPrintBodyComplementForces a body complement block to print while specifying the height of complement block.
iPrintReportPrints a report created with the report editor.
iPrintImageSends the image file to print to the print buffer.
iPrintWordSends the character string passed in parameter to the print "buffer".
iPrintAreaPrints a text in a rectangular area.
iInfoPrinterRetrieves the characteristics of the current or default printer.
iInitReportQueryInitializes the query linked to the report (for a query with parameters).
iInitReportQueryConnectionInitializes the query linked to the report.
iInitSubReportInitializes the parameters of a subreport of a composite report.
iImageWidthCalculates the width of the image to print (in millimeters).
iPageWidthCalculates the width (in millimeters) of the printable page while taking the left or right margins into account.
iTextWidthCalculates the width (in millimeters) of the text to print, according to the specified font.
iNewLinePrints a line (in Windows standard, with a rounded end) at specified coordinates.
iListNestedReportsReturns:
  • the list of nested reports currently printed (reports run by iPrintReport in one of the processes of the report currently printed).
  • the list of sequenced reports currently printed (iSequenceAdd).
iMarginDefines the "logical" print margins.
iMMToPicaConverts the coordinates of a point (expressed in millimeters) into system coordinates.
iPrintingNationModifies the current language for the next print (programmed print or report print).
iColumnNumReturns the number of the current column in a multi-column report.
iPageNumReturns or initializes the number of the page currently printed.
iParameterRetrieves the printer configuration and configures the print.
iParameterReportConfigures the printer by opening the configuration window.
iParameterPDFDefines the options for the generated PDF file.
iPicaToMMConverts the coordinates of a point (expressed in system coordinates) into millimeters.
iFontSelects the default font.
iDidotFontSelects the unit that will be used for the height of the fonts (created by iCreateFont): DIDOT point or PICA point.
iXPosUsed to manage the horizontal position (X-coordinate) of print cursor in the page.
iYPosUsed to manage the vertical position (Y-coordinate) of print cursor in the page.
iResetReinitializes the print settings (margins, font, paper format, orientation, ...) stored in the print library.
iResetNbPagesReinitializes the current number of pages, used in the preset controls such as "Number of pages" and "Page number and number of pages".
iSkipLineForces one or more line break.
iSkipPageGenerates a page break: the corresponding code is sent to the printer queue.
iSelectFontCreates a new print font from the standard window for font selection...
iReportPrintingStatusReturns the status of the current print.
iSubstBlockSubstitutes one block of the report with another block while the report is printed.
iColumnEndForces a column break in a multi-column report.
iPageEndForces the move to the next page during the report print.
iLinePrints a line at specified coordinates.
iHLinePrints a horizontal line at specified coordinates.
iVLinePrints a vertical line at specified coordinates.
Remark: The iPrintxxx functions only operate with the new Linux distributions.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment