bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed May 27, 2020 8:34 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Wed Mar 04, 2020 1:46 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 863
Location: Sijsele, Belgium
Hi Jimmy,

With loading a new document I mean the following. I f have 5 PDF documents. I have buttons previous / next. When a user click on next; the next pdf sshould be loaded and shown.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
PostPosted: Wed Mar 04, 2020 5:06 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1183
skiman wrote:
With loading a new document I mean the following. I f have 5 PDF documents. I have buttons previous / next. When a user click on next; the next pdf sshould be loaded and shown.

a PDF is like a Image so i see no Problem when have a PDF Viewer.

when talk about ActiveX it include to receive Event. this is not possible with "normal" PDF Viewer.
SumatraPDF have a API to "communicate". it also have Addon for merge,split, extract page.

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Fri Mar 06, 2020 3:43 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 863
Location: Sijsele, Belgium
Hi Jimmy,

i think you don't understand the question.

In a dchtmlviewer there is the method ::navigate(newfile) which will load the new file in the viewer. This way it is easily to add the previous/next functionality to 'scroll' through documents.

I didn't see a command line parameter to do this with sumatrapdf. There is a load to start, but I don't see some 'reload' parameter.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
PostPosted: Fri Mar 06, 2020 2:51 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1183
hi,

i´m talking about a Function or CLASS to use SumatraPDF on which i work.
it does NOT use XbpHtmlViewer() :naughty:

you can call SumatraPDF from Command-line but when maximize you can see that you need "more".
so i begin to write a Class as Wrapper using Ot4Xb for DLL Call

Code:
METHOD Sumatra_FileOpen( oPanel, cPdfFile, nPage, nZoom, nView, lBookmarks, lToolbar, cLang, cExeFile )

METHOD Sumatra_FrameAdjust( oPanel )

METHOD Sumatra_FileClose( oPanel, lRedraw )

so you load it like a Image.
if you want to load next you have to add a "next" Button.

---

if Express++ User like SumatraPDF i can send Roger Source Code so he can make a DC_Class of it.

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Fri Mar 06, 2020 8:05 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1183
so here is the DLL and LIB and some Demo Code
it is for v1.9.355 ONLY and this Version need OT4XB

Attachment:
File comment: need ot4xb
for v1.9.355 only

XB_PDF05.ZIP [22.46 KiB]
Downloaded 53 times

it NEED SumatraPDF.exe (not include) in same Directory
you can get it here https://www.sumatrapdfreader.org/free-pdf-reader.html

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Sat Mar 07, 2020 7:22 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4124
Location: Boise, Idaho USA
Quote:
if Express++ User like SumatraPDF i can send Roger Source Code so he can make a DC_Class of it.


If eXpress++ users request that I support SumatraPDF then I will put some time into this, otherwise I don't know why I should.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Sat Mar 07, 2020 8:06 am 
Offline

Joined: Sun Jan 18, 2015 11:43 am
Posts: 514
Location: Slovakia
Hi,

I am using Sumatra only as external print utility to direct print PDF to printer, because Sumatra has better management where I can set some parameters from command line as fit page, format, orientation etc.
This parameters not support PDF Acrobat Reader (no all version) or I do not remember how other problems I had with it to implement Sumatra.



Code:
* read or set default print parameters
if empty(aTlaciarne) .or. len(aTlaciarne)=0
   ndialogstyle:=2
   lforcedialog:=.F.
   aTlaciarne:={,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,lforcedialog,,,ndialogstyle,,,,,,,,,,,,,,,,,,,,,,}
endif

* show dialog for set parameters to print
aTlaciarne:=DC_PRINTERDIALOG(aTlaciarne)

* direct print to printer , in aTlaciarne filename to print is sublvpluschrono,
*************************************************   
cestasumatrapdf:=cestahlprg+"SumatraPDF.exe"
if file(cestasumatrapdf)=.T.
   if !empty(aTlaciarne) .and. len(aTlaciarne)>0 .and. !empty(aTlaciarne[50])
      nDuplexMode:=aTlaciarne[50]
   else
      nDuplexMode:=1
   endif   
   if nDuplexMode=1
      * jednostranná tlač
      RunShell("-print-to-default -print-settings shrink,paper=A4 "+sublvpluschrono,cestasumatrapdf,.f.,.t.)
   elseif nDuplexMode=2 .or. nDuplexMode=3
      * obojstranná tlač
      RunShell("-print-to-default -print-settings shrink,duplex,paper=A4 "+sublvpluschrono,cestasumatrapdf,.f.,.t.)
   endif
   oznam("Print success")
else
   oznam("Error, SumatraPDF.exe not found")
endif


Top
 Profile  
 
PostPosted: Sat Mar 07, 2020 2:29 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1183
hi Roger,
rdonnay wrote:
If eXpress++ users request that I support SumatraPDF then I will put some time into this, otherwise I don't know why I should.

as i know Acrobat Reader will be suspend so i´m working on a Solution after Acrobat.
SumatraPDF is one of these Solution which work fine and are Open Source.

so lets talk again in 2 Years when Acrobat was suspend and User search for new Solution

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Mon Mar 09, 2020 3:17 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 863
Location: Sijsele, Belgium
Auge_Ohr wrote:
i´m talking about a Function or CLASS to use SumatraPDF on which i work.
it does NOT use XbpHtmlViewer()

Yes, I know these are two different approaches.

Quote:
Code:
METHOD Sumatra_FileOpen( oPanel, cPdfFile, nPage, nZoom, nView, lBookmarks, lToolbar, cLang, cExeFile )
METHOD Sumatra_FrameAdjust( oPanel )
METHOD Sumatra_FileClose( oPanel, lRedraw )

so you load it like a Image.
if you want to load next you have to add a "next" Button.

Yes, there should be a new method to load another file.

But the question is: What would that method do? Is it necessary to do a fileclose, followed by a fileopen, OR is there a way to do a fileload. In the documentation I see a reuse-instance, but I don't know if this is to load other files, to refresh te screen.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
PostPosted: Mon Mar 09, 2020 4:22 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1183
hi,

how would you do it with Acrobat :?:

i do try to write a Wrapper for SumatraPDF instead of Command line to use with Xbase++
under harbour it use Function but i think a CLASS is a better Way for Xbase++

the Idea of ActiveX is to use it in "own Frame" instead of Stand-alone when call with RUNshell()
same is with SumatraPDF which IS a Stand-alone PDF Reader ... but it can use "plug-in"

i know Edgar have wrote a Wrapper 10 Years ago ... but that was much more complicate than using "plug-in" Trick (not sure it it was available in paste )
now i use only simple USER32 DLL Call and Ot4xb Syntax while i need a CallBack Slot()
as i read Xbase++ v2.x can use DLLCallBack() so Ot4Xb is not need under v2.x.

i will release Source next Day at Pablos Website http://www.xbwin.com -> Newsgroup

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


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