get the link of pdf.
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
get the link of pdf.
hello!
<question>
I would like to get the link of pdf.
i have 2 pdf.
one pdf has the link text for another pdf.
i would like to get the link document or URL when user clicked the link text.
<sample program>
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
MsgBox(AxCoPDFXCview1.?????)
End Sub
regards,
nais1
<question>
I would like to get the link of pdf.
i have 2 pdf.
one pdf has the link text for another pdf.
i would like to get the link document or URL when user clicked the link text.
<sample program>
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
MsgBox(AxCoPDFXCview1.?????)
End Sub
regards,
nais1
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: get the link of pdf.
You can use next code for for getting URL text
But this will work only with URLs. In next build we will try to add such functionality for opening PDF files also. Thanks.
Code: Select all
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnDisplayPrompt Then
If e.name = "Prompts.ConfirmOpenSite" Then
Dim vDataOut As Object
AxCoPDFXCview1.GetProperty("Prompts.ConfirmOpenSite.Name", vDataOut)
MsgBox(vDataOut)
End If
End If
End Sub
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
Re: get the link of pdf.
thanks for the code.
i try and used it.
but i could not get the link. it didnt work.
tell me any advice please.
regards,
nais1
i try and used it.
but i could not get the link. it didnt work.
tell me any advice please.
regards,
nais1
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: get the link of pdf.
Please note that this code will work only with Web links. Also what build you are using?
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
Re: get the link of pdf.
thanks for support.
but i would like 2 more functions.
please add them to next version.
<function>
1. to get the information of the link to file.
2. silent mode(i would like to hide the link address and path & filename to my user)
regards,
nais1
but i would like 2 more functions.
please add them to next version.
<function>
1. to get the information of the link to file.
2. silent mode(i would like to hide the link address and path & filename to my user)
regards,
nais1
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: get the link of pdf.
Ok, we will try to add such functionality in near future.
Thanks.
Thanks.
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
Re: get the link of pdf.
hello!
i have questions.
1. have you added following functions in next version?
2. i would like to modify in an exist PDF's url.
how do i write it the VB.NET code?
<function>
1. to get the information of the link to file.
2. silent mode(i would like to hide the link address and path & filename to my user)
regards,
nais1
i have questions.
1. have you added following functions in next version?
2. i would like to modify in an exist PDF's url.
how do i write it the VB.NET code?
<function>
1. to get the information of the link to file.
2. silent mode(i would like to hide the link address and path & filename to my user)
regards,
nais1
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: get the link of pdf.
hi,
To hide link address you should disable tooltips on comments. This may be done by using the following code:
You can receive notification from Viewer that user clicks on Web link or at the file link. To do this, use next code:
HTH.
To hide link address you should disable tooltips on comments. This may be done by using the following code:
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxCoPDFXCview1.SetProperty("Commenting.ShowTooltips", 0)
End Sub
Code: Select all
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnDisplayPrompt Then
If e.name = "Prompts.ConfirmOpenSite" Then
Dim vDataOut As Object = 0
AxCoPDFXCview1.GetProperty("Prompts.ConfirmOpenSite.Name", vDataOut)
If MsgBox(vDataOut, MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then
AxCoPDFXCview1.SetProperty("Prompts.ConfirmOpenSite.UserChoice", "Cancel")
End If
End If
If e.name = "Prompts.ConfirmLaunchFile" Then
Dim vDataOut As Object = 0
AxCoPDFXCview1.GetProperty("Prompts.ConfirmLaunchFile.FileName", vDataOut)
If MsgBox(vDataOut, MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then
AxCoPDFXCview1.SetProperty("Prompts.ConfirmLaunchFile.UserChoice", "Cancel")
End If
End If
Else
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnNamedNotify Then
Dim vDataOut As Object = 0
AxCoPDFXCview1.GetProperty("Notifications.ContextMenu.MenuName", vDataOut)
If vDataOut = "UrlLink" Then
AxCoPDFXCview1.SetProperty("Notifications.ContextMenu.UserChoice", -1) ' disable context menu for links
End If
End If
End If
End Sub
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
Re: get the link of pdf.
thanks for your support.
but 2nd code is different from my thought. my explane may not be good.
yes, this code is able to get the url when user click the hyperlink.
i would like to replace the url in the many PDF file's hyperlink by my software.
like following.
1. load the pdf by AxCoPDFXCview1 of Active X.
2. find hyperlink and url.
3. replace the url. <==== how to replace?
4. save that pdf.
5. next pdf....
tell me more advice in VB.NET code.
i also have the license of PDF-Tools 4 SDK.
regards,
nais1
but 2nd code is different from my thought. my explane may not be good.
yes, this code is able to get the url when user click the hyperlink.
i would like to replace the url in the many PDF file's hyperlink by my software.
like following.
1. load the pdf by AxCoPDFXCview1 of Active X.
2. find hyperlink and url.
3. replace the url. <==== how to replace?
4. save that pdf.
5. next pdf....
tell me more advice in VB.NET code.
i also have the license of PDF-Tools 4 SDK.
regards,
nais1
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: get the link of pdf.
Hello nais1,
For now we don't have any functions to modify links actions in PDF document.
For now we don't have any functions to modify links actions in PDF document.
-
- User
- Posts: 17
- Joined: Fri Jun 05, 2009 7:08 am
Re: get the link of pdf.
thanks for your replay.
i hope you will add that function in next version.
regards,
nais1
i hope you will add that function in next version.
regards,
nais1