({{, (RefLink[DisplayPacket, paclet:ref/DisplayPacket])[] 
is a WSTP packet that indicates the beginning of a series of expressions related to a PostScript graphic.}})

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Launch a subsidiary Wolfram Language kernel process:

link=LinkLaunch[First[$CommandLine] <> " -wstp"]

Read the first packet:

LinkRead[link]

Write an expression that generates a PostScript graphic:

LinkWrite[link,Unevaluated@Quiet[Get["Version5`Graphics`"];Plot[Sin[t],{t,0,Pi}]]]

Read the (RefLink[DisplayPacket, paclet:ref/DisplayPacket]) expression:

LinkRead[link]

Read the series of expressions for the PostScript graphic:

Short[LinkRead[link]]

Read the (RefLink[DisplayEndPacket, paclet:ref/DisplayEndPacket]) expression:

LinkRead[link]

Close the link:

LinkClose[link]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DisplayEndPacket, paclet:ref/DisplayEndPacket])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[WSTP and External Program Communication, paclet:tutorial/WSTPAndExternalProgramCommunicationOverview])}})}})