DynaPDF Manual - Page 317

Previous Page 316   Index   Next Page 318

Function Reference
Page 317 of 839
SI32 pdfCreateURIAction(
const PPDF* IPDF, // Instance pointer
const char* URL)
// URL of a website
A uniform resource identifier (URI) is a string that identifies (resolves to) a resource on the internet -
typically a file that is the destination of a hyperlink, although it can also resolve to a query or other
entity. A URI action causes a URI to be resolved. The parameter URL must be 7-bit ASCII string.
Actions must be added to a PDF object with AddActionToObj().
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
SI32 pdfCreateViewport(
const PPDF* IPDF, // Instance pointer
const char* Name, // Optional name of the viewport
double X1,
// Lower left corner
double Y1,
// Lower left corner
double X2,
// Upper right corner
double Y2)
// Upper right corner
The function creates a viewport. A viewport is a rectangular region of a page that can be associated
with a measure dictionary. A measure dictionary achieves a coordinate conversion so that the
distance and area can be calculated in other units like meters, feets, or millimeters, for example.
This is especially useful for CAD drawings which are not defined in PDF units. A PDF unit
represents 1/72 inch.
A page can contain an arbitrary number of viewports and every viewport can be assigned with its
own measure dictionary, e.g. to calculate coordinates in different units on the same page.
Viewports should be created in drawing order. Since viewports might overlap a PDF viewer
examines the array starting with the last one and itereates in reverse order. The first one whose
bounding box contains the point or cursor coordiante is chosen.
See also CreateRectilinearMeasure().
This function is implemented in an Ansi and Unicode compatible variant.

Previous topic: Specific flags supported by text fields:

Next topic: CreateXFAStream, DecryptPDF