PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Oct 22, 2017 8:21 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jun 20, 2017 1:18 pm 
Offline

Joined: Tue Apr 26, 2016 8:24 pm
Posts: 20
Hello everyone,
I'm using DocumentPreview to quickly preview the document.
And what I want is when I press a button, the document viewer position should move to a specific bookmark.

I tried to put the document preview in a frame and use URI to move it but nothing happends.

XAML
Code:
    <Frame x:Name="DocFrame">
        <Frame.Content>
            <Grid x:Name="gridTest">
                <md:DocumentPreview x:Name="Preview"/>
            </Grid>
        </Frame.Content>
    </Frame>

C#
Code:
viewer.DocFrame.Navigate(new Uri("#3__sda", UriKind.Relative));


I also added the DDL.

Is there any way to navigate in preview window by using bookmarks? (or to navigate in preview window to go to a specific paragraph?)
If its not possible in migradoc document preview, is there anything else that I can use to preview and navigate in a WPF application?


Attachments:
previewddl.rar [1.1 KiB]
Downloaded 9 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 21, 2017 8:16 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2720
Location: Cologne, Germany
Hi!
MariusIonut wrote:
Is there any way to navigate in preview window by using bookmarks?
I don't know. But since MigraDoc is open source I think there are many ways, but I guess you have to modify MigraDoc Preview to get that.

You call "Navigate" for "DocFrame", not for "Preview". I don't know if "Preview" is prepared to navigate to DDL bookmarks (but I'm afraid it is not).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 26, 2017 5:19 pm 
Offline

Joined: Tue Apr 26, 2016 8:24 pm
Posts: 20
Thank you Thomas, it seems that it is possible to navigate within the frame only if the document is a XPS one, that will allow to navigate via package links.

Thomas Hoevel wrote:
Hi!
MariusIonut wrote:
Is there any way to navigate in preview window by using bookmarks?
I don't know. But since MigraDoc is open source I think there are many ways, but I guess you have to modify MigraDoc Preview to get that.

You call "Navigate" for "DocFrame", not for "Preview". I don't know if "Preview" is prepared to navigate to DDL bookmarks (but I'm afraid it is not).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group