PGetStoryText

Gets the highlighted text (or entire story if text block is selected) and returns it in the specified format.


Query constructor

PGetStoryText(short nType, short nFormat);

short nType;

0 for raw text
1 for tagged text (paragraph style name is added to beginning of each paragraph)
2 for rich text format (RTF)

short nFormat;

0 to keep all non-printing characters
1 to delete all non-printing characters
2 to replace all non-printing characters with spaces
3 to substitute all non-printing ASCII characters as text export filter does (see "Translation table" below).


Query results

const char * sText;

Highlighted text

Pointer versus text tool. If a text block is selected using the pointer tool or the PSelect command, PageMaker returns the whole story, even when the text block contains only a portion of the story. If a range of text has been highlighted using the text tool or the PTextSelect command, PageMaker returns only the selected text.

Selecting several lines. Be careful not to select too much text; this query can return a large amount of data. If your plug-in, rather than PageMaker, allocates the reply buffer but doesn't make it large enough, the query will fail.

64K query return limit for Windows. In PageMaker for Windows, the return from a query is limited to 64K. Plug-ins can work around the 64K limit by requesting a handle to the query results, and then process the text with a HUGE pointer.

nFormat. nFormat is used only if nType is 0 (zero) or 1 (one).

Windows only. PageMaker for Windows treats the following characters as non-printing characters:

Translation table. The following translation table shows the hexadecimal value that PageMaker uses to substitute non-printing characters when nFormat equals 3.
Characters Hex value Replace with
Soft hyphen 0x15  
Soft hyphen 0x16
Soft hyphen 0x17
Page number 0x18
Kern apart 0x1C
Kern closer 0x1D
Soft hyphen 0x1F
Em space 0x19 0x20 0x20
En space 0x1A 0x20
Thin space 0x1B 0x20
The following characters apply only to PageMaker for Windows.    
Em dash 0x06 0x2D 0x2D
En dash 0x05 0x2D
No-break dash 0x10 0x2D
No-break slash 0x0F 0x2F
Printer open quotes 0x0 0x22
Printer close quotes 0x0B 0x22
Printer single open quotes 0x91 0x27
Printer single close quotes 0x92 0x27
Line end 0x0E 0x0D 0x0A
Paragraph end 0x0D 0x0D 0x0A


See also

The PGetStoryID, PGetStoryIDList, and PGetStoryList queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support .