I'am trying to show a pdf in a p:dialog , but i want to open pdf in a spécific destination, there is my code:
<p:commandLink value="test" oncomplete="PF('dlg').show()"/>
<p:dialog header="Dialog" widgetVar="dlg"
resizable="false"
fitViewport="true">
<pe:documentViewer height="500" width="800"
nameddest="nature"
name="helpImmo.pdf"/>
</p:dialog>
So the pdf is opened but in the first page
NB:when i use the page attribute it works
Attribute
nameddestofpe:documentViewercan be used to open PDF in specific named destination which is technically different then bookmark.To test if your code and project libraries work correctly, download this pdf example, include it into your project and in
pe:documentViewerand set, for example, nameddest="Chapter3".I've tested it with PF 6.1 and PF-extensions 6.1. It works OK on my side and opens requested named destination.
So make sure that
Also you can programmatically add named destinations to your PDF with iText java library as described in this example.