PDF viewer — version history
A PDF viewer built into the window: a document from the disk or published on the web, with paging, zoom and printing, without launching an external application. Introduced in 1.0.
4.0 — October 2026 #
New #
ue_load_failed(as_source, as_reason)tells why a document is not displayed — missing file, not a PDF, unreachable site, certificate, insecure address, document too large… (REASON_*constants) — and the viewer stays empty.ue_link_clicked(as_url): a link followed in the document (simple click or Ctrl+click) hands you its address, and the viewer stays on the document.as_urlis anhttps://…or amailto:…as is, or a disk path for a link to a local file.ib_allow_saveandib_allow_print: offer or remove the Save (and Save as) and Print commands of the viewer toolbar.of_printprints the document (not the page around it); it returns-4with no document.- The addresses
file:///C:/…,file://localhost/…andfile:////server/share/…are accepted and converted into a path. - Giving the focus to the component (Tab,
of_focus_webview) gives it to the document: Page Down, arrows, Home and End scroll it. - PDFs of 32 MB and more are displayed (served in chunks), as are paths longer than 260 characters; a displayed file can be rewritten by your application while it is on screen.
- The content follows the application's default theme, with no white rectangle before the first display.
Fixed #
- A PDF regenerated at the same path is displayed as it is on disk on
of_refresh(the old version stayed for five minutes). - A
#in a file name (Quote #12.pdf) no longer cuts the path; the fragment of a web address no longer mixes withii_pageandii_zoom. ii_pageset beforeis_sourceis kept for that document instead of being lost.ue_load_completedis no longer raised on an error page.- A remote PDF served "as a download" is no longer saved into the machine's Downloads folder.
- The viewer is born empty, in the same state as after
of_reset(). - Enter or Esc pressed in the component, when it does not use them, goes back to the window: the PowerBuilder
DefaultorCancelCommandButtonfires (the key was lost). - With no language chosen by the application, the component announces English to screen readers (it announced French).
is_theme_style,is_theme_modeandil_theme_accentread back the style and mode shown and the component's own accent (-1when it has none); an unknown or badly written value is ignored instead of leaving the component without a theme, and an axis left empty follows the application's theme.- The application accent (
PBT_SetDefaultThemeAccent) survives a change of theme, is followed as long as the component has no accent of its own, and repaints everything derived from it (hover, pressed, selections); Windows high contrast is supported.
Behavior changes #
See the "Migrating from 3.0 to 4.0" guide, sections 11.3, 11.5 and 11.27.
is_sourceread back and theas_sourceofue_load_completedreturn what you wrote (doc\notice.pdf), no longer an internal address.- The viewer only displays PDFs: an
http://address, a web page or adata:address of another type is refused throughue_load_failed; so is adata:address of more than 2 million characters (REASON_TOO_LARGE). of_refreshreturns along:0once requested,-4with no document,-2if the component is not created; after a refusal, it repeats the refusal throughue_load_failed.of_print_to_pdfreturns-4without writing anything: the document already is a PDF, copy the file ofis_source.- A link in the document no longer replaces the displayed document: it raises
ue_link_clicked.
3.0 — September 2026 #
New #
of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).
2.0 — September 2026 #
New #
ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.
Fixed #
- A Windows path, or a text containing a quote, received in an event arrives intact (backslashes are no longer doubled, the text is no longer cut at the quote).
1.0 — August 2026 #
New #
- Displays a document from the disk (absolute path or relative to the application) or published on the web: setting
is_sourceis enough,""empties the viewer;ue_load_completedreports the load. - Opening page (
ii_page), zoom (ii_zoom) or fit (is_fit:FIT_PAGE,FIT_WIDTH,FIT_HEIGHT), viewer toolbar shown or hidden (ib_viewer_toolbar). of_refreshreloads the current document, for example after it was regenerated.