Hi!
For some reason, in Windows-10, the DC_Print Preview Acrobat() command does not show the pdf file. At the same time, no error messages or others are issued
For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
This is a very old function that required the Acrobat OCX (ActiveX control) be installed on the computer.
I suggest that you just use DC_SpawnUrl(<cPdfFile>).
I suggest that you just use DC_SpawnUrl(<cPdfFile>).
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
Hi, Roger! Thank you for answering. Unfortunately, under Windows-10, this DC_SpawnUrl(<cPdfFile>) function works exactly the same as DC_PrintPreviewAcrobat(). I tried to specify the path to the pdf file and short (only the file name) and full (disk + all folders + file name). It works the same way: it does not write or display anything. Under Windows-7, the new version works well, just like the old one
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
You need to install Acrobat Reader on your Windows 10 computer.
The eXpress train is coming - and it has more cars.
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
Hi,
Maybe you can try this.
If this doesn't work, there is something missing on your system. With the above it just opens the cFile with the application defined in your windows, which is the same when using DC_SpawnUrl().
Maybe you can try this.
Code: Select all
cPdfFile := "xxx.pdf"
DllCall( "Shell32.dll" , DLL_STDCALL, ;
"ShellExecuteA", 0, Chr(0), cPdfFile , Chr(0), Chr(0), 3)
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
Hi Eugene,
I am opening PDF files simply with Runshell()
RunShell(pathpdf+filepdf,pathtopdfviewer,.t.,.f.)
and pathtopdfviewer I found in registry :
pathtopdfviewer:=DC_Regquery(HKEY_CLASSES_ROOT,"Software\Adobe\Acrobat\Exe")
if Valtype(pathtopdfviewer) # 'C' .OR. Empty(pathtopdfviewer)
oznam("Upozornenie : nainštalujte Acrobat Reader, inak nebude možné zobrazovať PDF súbory")
else
pathtopdfviewer=strtran(pathtopdfviewer,["])
endif
look also to modify path with strtran
Acrobat Reader can be in different directories in Windows 7 or Windows 10.
For printing I use SumatraPDF, because there is better select parameter to printer.
I am opening PDF files simply with Runshell()
RunShell(pathpdf+filepdf,pathtopdfviewer,.t.,.f.)
and pathtopdfviewer I found in registry :
pathtopdfviewer:=DC_Regquery(HKEY_CLASSES_ROOT,"Software\Adobe\Acrobat\Exe")
if Valtype(pathtopdfviewer) # 'C' .OR. Empty(pathtopdfviewer)
oznam("Upozornenie : nainštalujte Acrobat Reader, inak nebude možné zobrazovať PDF súbory")
else
pathtopdfviewer=strtran(pathtopdfviewer,["])
endif
look also to modify path with strtran
Acrobat Reader can be in different directories in Windows 7 or Windows 10.
For printing I use SumatraPDF, because there is better select parameter to printer.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: For some reason, in Windows-10, the DC_PrintPreviewAcrobat() command does not show the pdf file
My dear colleagues! Option c SumatraPDF-3.4.5-32.exe (portable) I liked it the most, because it does not depend on the Windows version at all and from what is installed or not installed under Windows. I just put SumatraPDF-3.4.5-32.exe in the folder with the system, I replaced everywhere in the text of the system: a command like DC_PrintPreviewAcrobat( CFile, '6.3. Advanced decision-making algorithm of ASC-analysis') with RunShell(file,"SumatraPDF-3.4.5-32.exe ",.T.). The Sumatra PDF program itself is made very pleasantly, with taste. A good program. Everything works fine! Thank you all very much!Victorio wrote: ↑Fri Sep 09, 2022 3:41 am Hi Eugene,
I am opening PDF files simply with Runshell()
RunShell(pathpdf+filepdf,pathtopdfviewer,.t.,.f.)
and pathtopdfviewer I found in registry :
pathtopdfviewer:=DC_Regquery(HKEY_CLASSES_ROOT,"Software\Adobe\Acrobat\Exe")
if Valtype(pathtopdfviewer) # 'C' .OR. Empty(pathtopdfviewer)
oznam("Upozornenie : nainštalujte Acrobat Reader, inak nebude možné zobrazovať PDF súbory")
else
pathtopdfviewer=strtran(pathtopdfviewer,["])
endif
look also to modify path with strtran
Acrobat Reader can be in different directories in Windows 7 or Windows 10.
For printing I use SumatraPDF, because there is better select parameter to printer.