forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with using VDSPDF

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Fri May 05, 2006 11:18 am    Post subject: Help with using VDSPDF Reply with quote

Has anybody got this to work under VSD5? I am trying the supplied example and adding the lines

#DEFINE COMMAND,PDF
#DEFINE FUNCTION,PDF

but the example fails with 'Error in external command or function' when it hits the PDF OPEN line. This will happen with any PDF file, not just the license.pdf file (which is on the correct path anyway). The DLL is no longer supported so I guess that it is now quite old and may be an OS issue (I am running WinXP SP2).

I'd be interested to know if anybody has got this working.

Thanks

_________________
David
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Fri May 05, 2006 11:57 am    Post subject: Reply with quote

Hi Steeld,

A more complete display of your source code might be helpful...

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Fri May 05, 2006 1:02 pm    Post subject: Reply with quote

As I said, I am trying the supplied VDS5 example. Here is the code:

Title VDSPDF DEMO
rem Demo by eXtremesenses Software

OPTION SCALE, 96
OPTION DECIMALSEP,"."
DIRECTORY CHANGE, @path(%0)

EXTERNAL @path(%0)vdspdf.dll
#DEFINE COMMAND,PDF
#DEFINE FUNCTION,PDF

DIALOG CREATE,VDSPDF DEMO,-1,0,694,514,CLASS TVDSPDF,RESIZABLE
DIALOG ADD,STYLE,Style1,Verdana,7,B,,black
DIALOG ADD,STYLE,style2,Verdana,7,B,,white
pdf window,#TVDSPDF
pdf add,mPDF,35,0,616,374
DIALOG ADD,MENU,File,Open,Print,Print All,Print with Dialog,-,Exit
DIALOG ADD,BUTTON,Next,6,88,64,24,Next,,Style1
DIALOG ADD,BUTTON,Previous,6,158,64,24,Previous,,Style1
DIALOG ADD,BUTTON,Last,6,228,64,24,Last,,Style1
DIALOG ADD,BUTTON,First,6,296,64,24,First,,Style1
DIALOG ADD,BUTTON,ForwardS,6,364,64,24,ForwardS,,Style1
DIALOG ADD,BUTTON,Backws,6,432,64,24,Backws,,Style1
DIALOG ADD,BUTTON,Hidetool,6,608,64,24,Hidetool,,Style1
DIALOG ADD,BUTTON,Showtool,6,608,64,24,Showtool,,Style1

DIALOG HIDE,Showtool

DIALOG SHOW


pdf open,mPDF,@path(%0)license.pdf

:resize
PDF setpos,mPDF,35,0,@diff(@dlgpos(,W),0),@diff(@dlgpos(,H),35)

:Evloop
wait event
goto @event()

:OpenMENU
%F = @filedlg("PDF files (*.pdf)|*.pdf",Load)
if @ok()
pdf open,mPDF,%f


end

goto evloop
:NextBUTTON
pdf GOTONEXTPAGE,mPDF
goto evloop
:PreviousBUTTON
pdf GOTOPREVIOUSPAGE,mPDF
goto evloop

:LastBUTTON
pdf GOTOLASTPAGE,mPDF
goto evloop
:FirstBUTTON
pdf GOTOFIRSTPAGE,mPDF
goto evloop
:BackwsBUTTON
pdf GOBACKWARDSTACK,mPDF
goto evloop
:ForwardsBUTTON
pdf GOFORWARDSTACK,mPDF
goto evloop
:PrintMENU
pdf PRINT,mPDF
goto evloop
:Print AllMENU
pdf PRINTALL,mPDF
goto evloop

:Print with DialogMENU
pdf PRINTWITHDIALOG,mPDF
goto evloop


:HidetoolBUTTON
%%toolbaroff = @pdf(toolbaroff,mPDF)
DIALOG HIDE,Hidetool
DIALOG SHOW,ShowTool
goto evloop
:ShowtoolBUTTON
%%toolbaron = @pdf(toolbaron,mPDF)
DIALOG SHOW,Hidetool
DIALOG HIDE,ShowTool
goto evloop

:error
option errortrap
warn Error @error(E) at line @error(N)!

:exitMENU
:close
rem The following line must be in your CLOSE function of your VDS APP or
rem the PDF engine will not be freed from memory and can have side effects
rem on Windows.
pdf REMOVE,mPDF

exit

_________________
David
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri May 05, 2006 1:17 pm    Post subject: Reply with quote

Hello David,

I just ran the example provided with VDSPDF without any problems after adding the two #define lines. I am running Windows XP SP2 and have Adobe Reader 6.0 installed. Please note you need Adobe Reader 4.0 or higher for the software to work. A (too) new version might also cause these problems if Adobe's intern code has changed.

Just to check if the DLL you are using isn't damaged, try these lines of code Smile

Code:
#define function, pdf
external @path(%0)vdspdf.dll
info DLL version: @pdf(version)

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Fri May 05, 2006 1:24 pm    Post subject: Reply with quote

Interestingly, Windows reports the file version as being 1.2.0.0 while the @PDF(VERSION) function returns 1.0 ....

So, the DLL is being loaded and appears to work - it's the PDF OPEN that doesn't work and that's pretty fundamental to an add-on that claims to work with PDF files. Sad

_________________
David
Back to top
View user's profile Send private message
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Fri May 05, 2006 3:27 pm    Post subject: Reply with quote

>A (too) new version might also cause these problems if Adobe's intern code has changed.

Thank you skit3000. Maybe you are right - I am using the full Adobe CS2 suite complete with Acrobat Professional 7.0. Maybe it's just not compatible with more recent versions. Sad

_________________
David
Back to top
View user's profile Send private message
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Sat May 06, 2006 11:34 am    Post subject: Reply with quote

Hi I am the author of VDSPDF and would like to tell you that its been tested with Adobe 6.0 and LOWER. I dont 7.0 here.

Like Skit said it might be something in the ActiveX of 7.0 that changed.

I dont plan to update the DLL either. Sorry.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
steeld
Valued Newbie


Joined: 03 May 2006
Posts: 26
Location: Cambridge, UK

PostPosted: Mon May 08, 2006 8:25 am    Post subject: Reply with quote

OK Marty, thanks. I knew that you had no plans to update this but I was checking to make sure that I wasn't doing anything stupid. Wink
_________________
David
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon May 08, 2006 12:44 pm    Post subject: Reply with quote

I have Acrobat Reader 7 and the example does not work for me either. (Acrobat Reader 7 is MUCH faster and smoother than Acrobat Reader 6, by the way - if anyone is thinking of upgrading.)

I use PDFs in some applications and I open them via the VDS browser element, or the VDSSurfx browser. Each has different advantages in different situations.

They work very well for my purposes - perhaps for yours as well.

_________________
Joe Floyd
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group