Hello there,
I will leave with Access to display a PDF file in a form.
With the control PDF-XChange Viewer Simple ActiveX (Version 2.5 Build 204.0) I can already display PDF .
How do I manage but , adjust the zoom ?
Which zoom options are available?
Thank you
Volker
Deutsche Version:
Hallo,
ich will mit Access eine PDF-Datei in einem Formular anzeigen lassen.
Mit dem Steuerelement PDF-XChange Viewer Simple ActiveX (Version 2.5 Build 204.0) kann ich bereits PDF anzeigen lassen.
Wie schaffe ich es aber, den Zoom einzustellen?
Welche Zoom-Möglichkeiten gibt es?
Vielen Dank
Volker
Access - Viewer Simple ActiveX - Zoom Problems
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 4
- Joined: Thu Feb 04, 2016 6:28 am
- Tracker Supp-Stefan
- Site Admin
- Posts: 17932
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hello Volker,
I believe this will help:
https://forum.pdf-xchange.com/ ... 739#p69739
Regards,
Stefan
I believe this will help:
https://forum.pdf-xchange.com/ ... 739#p69739
Regards,
Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hi Volker.
You may use:
pdfViewer.SetDocumentProperty("Pages.Zoom", 300, 0); // sets 300% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "300%", 0); // sets 300% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "ActualSize", 0); // sets 100% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "FitPage", 0); // enables "Fit Page to current client area" mode
pdfViewer.SetDocumentProperty("Pages.Zoom", "FitWidth", 0); // enables "Fit Page's Width to current client area" mode
Help Topic:
https://help.pdf-xchange.com/DEV/de ... item_pages
Also look to our SDK-Example projects.
HTH.
You may use:
pdfViewer.SetDocumentProperty("Pages.Zoom", 300, 0); // sets 300% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "300%", 0); // sets 300% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "ActualSize", 0); // sets 100% zoom
pdfViewer.SetDocumentProperty("Pages.Zoom", "FitPage", 0); // enables "Fit Page to current client area" mode
pdfViewer.SetDocumentProperty("Pages.Zoom", "FitWidth", 0); // enables "Fit Page's Width to current client area" mode
Help Topic:
https://help.pdf-xchange.com/DEV/de ... item_pages
Also look to our SDK-Example projects.
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 4
- Joined: Thu Feb 04, 2016 6:28 am
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hello there,
first of all thank you for the quick reply .
Unfortunately I get this with the pseudo code does not go in Access .
Can anyone one of you a matching VBA code to give the works ?
Thank you
Volker
Deutscher Text:
Hallo,
erst einmal vielen Dank für die schnelle Antwort.
Leider bekomme ich das mit dem Pseudocode nicht hin in Access.
Kann mir einer von Euch einen passenden VBA Code geben der funktioniert?
Vielen Dank
Volker
first of all thank you for the quick reply .
Unfortunately I get this with the pseudo code does not go in Access .
Can anyone one of you a matching VBA code to give the works ?
Thank you
Volker
Deutscher Text:
Hallo,
erst einmal vielen Dank für die schnelle Antwort.
Leider bekomme ich das mit dem Pseudocode nicht hin in Access.
Kann mir einer von Euch einen passenden VBA Code geben der funktioniert?
Vielen Dank
Volker
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hello Volker,
Try this
Try this
Code: Select all
Dim nDocID As Integer
Call CoPDFXCview0.GetActiveDocument(nDocID)
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", 300, 0) ' sets 300% zoom
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "300%", 0) 'sets 300% zoom
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "ActualSize", 0) 'sets 100% zoom
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitPage", 0) 'enables "Fit Page to current client area" mode
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitWidth", 0) 'enables "Fit Page's Width to current client area" mode
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 4
- Joined: Thu Feb 04, 2016 6:28 am
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hello,
Thank you for the fast answer.
Unfortunately this code works so with me not.
I explain again what I have done exactly
1. My version is a freeware version 2.5 (Build 204.0)
2. Add a new Access (2010) window I now have the control PDF-XChange Viewer ActiveX Control inserted
The name of the control element called CoPDFXCview0
3. Add a button with the following code
Private Sub Befehl8_Click ()
Me.CoPDFXCview0.Src = "C: \ Temp \ Test.pdf"
End sub
With this code, although the PDF is displayed, but not show up correctly.
I Fill now the code as follows:
Private Sub Befehl8_Click ()
Me.CoPDFXCview0.Src = "C: \ Temp \ Test.pdf"
Dim nDocID As Integer
Call CoPDFXCview0.GetActiveDocument (nDocID)
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", 300, 0)' sets 300% zoom
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "300%", 0)' sets 300% zoom
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "Actual Size", 0)' sets 100% zoom
Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "FitPage", 0) 'Enables "Fit Page to current client area" mode
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "fitwidth", 0)' Enables "Fit Page Width to's current client area" mode
End Sub
I get in line
Call CoPDFXCview0.GetActiveDocument (nDocID)
a runtime error 13 type mismatch
I Swap now the control PDF-XChange Viewer ActiveX Control to the PDF-XChange Viewer Simple ActiveX from (name is again CoPDFXCview0)
I get a runtime error 438 Object does not support this property or method.
The above commented lines are but other display options, or I see this wrong?
My question: What am I doing wrong? Is it because that I just use a freeware version? Or what else could it still lie?
Would be nice if someone could help me.
Thank you very much
Volker
Deutsche Version:
Hallo,
vielen Dank für die schnelle Antwort.
Leider klappt dieser Code so bei mir nicht.
Ich erkläre einmal, was ich genau gemacht habe
1. Meine Version ist eine Freeware-Version 2.5 (Build 204.0)
2. In einem neuen Access (2010) Fenster habe ich nun das Steuerelement PDF-XChange Viewer ActiveX Control eingefügt
Der Name des Steuerelementes heisst CoPDFXCview0
3. Einen Button mit folgendem Code
Private Sub Befehl8_Click()
Me.CoPDFXCview0.Src = "C:\Temp\Test.pdf"
End sub
Mit diesem Code wird zwar die PDF angezeigt, aber leider nicht richtig dargestellt.
Ergänze ich nun den Code wie folgt:
Private Sub Befehl8_Click()
Me.CoPDFXCview0.Src = "C:\Temp\Test.pdf"
Dim nDocID As Integer
Call CoPDFXCview0.GetActiveDocument(nDocID)
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", 300, 0) ' sets 300% zoom
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "300%", 0) 'sets 300% zoom
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "ActualSize", 0) 'sets 100% zoom
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitPage", 0) 'enables "Fit Page to current client area" mode
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitWidth", 0) 'enables "Fit Page's Width to current client area" mode
End Sub
bekomme ich in den Zeile
Call CoPDFXCview0.GetActiveDocument(nDocID)
einen Laufzeitfehler 13, Typen unverträglich
Tausche ich nun das Steuerelement PDF-XChange Viewer ActiveX Control gegen das PDF-XChange Viewer Simple ActiveX aus (Name ist wieder CoPDFXCview0)
bekomme ich einen Laufzeitfehler 438, Objekt unterstützt diese Eigenschaft oder Methode nicht.
Die oben auskommentierten Zeilen sind doch nur andere Darstellungsmöglichkeiten, oder sehe ich dies falsch?
Meine Frage: Was mache ich falsch? Liegt es daran, dass ich nur eine Freeware-Version benutze? Oder woran könnte es sonst noch liegen?
Wäre schön, wenn jemand mir helfen könnte.
Vielen Dank
Volker
Thank you for the fast answer.
Unfortunately this code works so with me not.
I explain again what I have done exactly
1. My version is a freeware version 2.5 (Build 204.0)
2. Add a new Access (2010) window I now have the control PDF-XChange Viewer ActiveX Control inserted
The name of the control element called CoPDFXCview0
3. Add a button with the following code
Private Sub Befehl8_Click ()
Me.CoPDFXCview0.Src = "C: \ Temp \ Test.pdf"
End sub
With this code, although the PDF is displayed, but not show up correctly.
I Fill now the code as follows:
Private Sub Befehl8_Click ()
Me.CoPDFXCview0.Src = "C: \ Temp \ Test.pdf"
Dim nDocID As Integer
Call CoPDFXCview0.GetActiveDocument (nDocID)
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", 300, 0)' sets 300% zoom
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "300%", 0)' sets 300% zoom
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "Actual Size", 0)' sets 100% zoom
Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "FitPage", 0) 'Enables "Fit Page to current client area" mode
'Call CoPDFXCview1.SetDocumentProperty (nDocID, "Pages.Zoom", "fitwidth", 0)' Enables "Fit Page Width to's current client area" mode
End Sub
I get in line
Call CoPDFXCview0.GetActiveDocument (nDocID)
a runtime error 13 type mismatch
I Swap now the control PDF-XChange Viewer ActiveX Control to the PDF-XChange Viewer Simple ActiveX from (name is again CoPDFXCview0)
I get a runtime error 438 Object does not support this property or method.
The above commented lines are but other display options, or I see this wrong?
My question: What am I doing wrong? Is it because that I just use a freeware version? Or what else could it still lie?
Would be nice if someone could help me.
Thank you very much
Volker
Deutsche Version:
Hallo,
vielen Dank für die schnelle Antwort.
Leider klappt dieser Code so bei mir nicht.
Ich erkläre einmal, was ich genau gemacht habe
1. Meine Version ist eine Freeware-Version 2.5 (Build 204.0)
2. In einem neuen Access (2010) Fenster habe ich nun das Steuerelement PDF-XChange Viewer ActiveX Control eingefügt
Der Name des Steuerelementes heisst CoPDFXCview0
3. Einen Button mit folgendem Code
Private Sub Befehl8_Click()
Me.CoPDFXCview0.Src = "C:\Temp\Test.pdf"
End sub
Mit diesem Code wird zwar die PDF angezeigt, aber leider nicht richtig dargestellt.
Ergänze ich nun den Code wie folgt:
Private Sub Befehl8_Click()
Me.CoPDFXCview0.Src = "C:\Temp\Test.pdf"
Dim nDocID As Integer
Call CoPDFXCview0.GetActiveDocument(nDocID)
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", 300, 0) ' sets 300% zoom
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "300%", 0) 'sets 300% zoom
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "ActualSize", 0) 'sets 100% zoom
Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitPage", 0) 'enables "Fit Page to current client area" mode
' Call CoPDFXCview1.SetDocumentProperty(nDocID, "Pages.Zoom", "FitWidth", 0) 'enables "Fit Page's Width to current client area" mode
End Sub
bekomme ich in den Zeile
Call CoPDFXCview0.GetActiveDocument(nDocID)
einen Laufzeitfehler 13, Typen unverträglich
Tausche ich nun das Steuerelement PDF-XChange Viewer ActiveX Control gegen das PDF-XChange Viewer Simple ActiveX aus (Name ist wieder CoPDFXCview0)
bekomme ich einen Laufzeitfehler 438, Objekt unterstützt diese Eigenschaft oder Methode nicht.
Die oben auskommentierten Zeilen sind doch nur andere Darstellungsmöglichkeiten, oder sehe ich dies falsch?
Meine Frage: Was mache ich falsch? Liegt es daran, dass ich nur eine Freeware-Version benutze? Oder woran könnte es sonst noch liegen?
Wäre schön, wenn jemand mir helfen könnte.
Vielen Dank
Volker
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Access - Viewer Simple ActiveX - Zoom Problems
Hello Volker,
Try using this:
Try using this:
Code: Select all
Dim nDocID As Long
Call CoPDFXCview1.GetActiveDocument(nDocID)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ