public class FitWidthDestination extends DirectDestination
A destination fits the width of a page into the viewport.
Note: Many PDF viewers support different viewing modes like "fit page" or
"fit width".
A FitWidthDestination will change the current viewing mode to
"fit width" in those viewers.
Changing the viewing mode is usually not very well received by users
and thus a LocationZoomDestination should be preferred in most cases.
| Modifier and Type | Method and Description |
|---|---|
static FitWidthDestination |
create(Document targetDocument,
Page page,
boolean fitActualContent)
Create a new FitWidthDestination
|
static FitWidthDestination |
createDynamicObject(long handle) |
boolean |
getFitActualContent()
If
true, the viewport is fitted to the width of the actual content of the page,
instead of the width of the page. |
getPagegetTargetequals, hashCodepublic static FitWidthDestination createDynamicObject(long handle)
public static FitWidthDestination create(Document targetDocument, Page page, boolean fitActualContent)
targetDocument - The output document with which the returned object is associatedpage - The page in the document that this destination is pointing to.fitActualContent -
If true, the viewport is fitted to the actual content of the page,
instead of the size of the page.
See property getFitActualContent() for more information.
java.lang.IllegalArgumentException - if the targetDocument argument is nulljava.lang.IllegalArgumentException - if the targetDocument argument has already been closedjava.lang.IllegalArgumentException - if the targetDocument argument is read-onlyjava.lang.IllegalArgumentException - if the targetDocumentdiffers from the document associated with pagejava.lang.IllegalArgumentException - If the page argument is null.java.lang.IllegalArgumentException - If the page argument is already closed.public boolean getFitActualContent()
If true, the viewport is fitted to the width of the actual content of the page,
instead of the width of the page.
Note: Many PDF viewers simply ignore this property and always treat it
as false, i.e. switching to "fit page" mode anyway.
java.lang.IllegalStateException - the object has already been closed.java.lang.IllegalStateException - the associated document has already been closed.