6 posts in this topic
I need help.
I have a project that outputs reports to PDF using @mLipok's lovely QuickPDF. The PDF is created with no problem and I am sure the problem is not there.
However, I then have to open the PDF so the user can see it.
I use (a) short file name and (b) object properties
$oQP.SetPageLayout(2) $oQP.SetPageMode(3) ... $sFilename ; as created by UDF Local $sShortname = FileGetShortname( sFilename , 1 ) Run( @ComSpec & " /c start /max " & sShortname, "", @SW_HIDE ) ; force default PDF reader to open PDF maximized Then the RUN should open it with the default application.
I have tested extensively on 32 bit Win7 and 64 bit Win10. Works.
However, 64 bit Win8 and another Win7 laptop gives a problem.
The problem is this: when (typically) Adobe Reader is ALREADY open, the PDF opens almost instantaneously. If the Reader is not open, it seems to stall. Never opens.
The host on which the report will be opened is unknown to me and the PDF reader can not be hard coded.
Right now, my only brutal, very un-stylish solution is to force the Reader open prior to the RUN command.
Any ideas or advice on what causes this or how it could be remedied would be greatly appreciated.
I found a code in C++ for file format conversion from RTF to PDF with using Debenu QuickPDF.
I know how to use Debenu QuickPDF in AutoIt .
My question is about RTF part of this code:
HDC hdcNew = debenu->GetCanvasDC( RTFPRINTINGDOTSPERINCH * RTFPAGEWIDTHININCHES, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight);
First there is hdcNew declaration , and this is not the problem.
My problem is in converting the following code snippet, to AutoIt
canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight);
If you remember, I created RTFPrinter sometime ago. But it was some time ago , and created by trial and error, rather than in-depth analysis.
Also, it was just a modification of another script, not my own work from scratch.
So now I'm looking for help how to adapt this code snippet to AutoIt.
Any tips ?
I would like to present, the UDF for Debenu Quick PDF Library
First time installing Debenu Quick PDF Library:
You can download demo here:
file "DebenuPDFLibraryLite1012.dll" or "DebenuPDFLibraryAX1014.dll" must be in @ScriptDir
if you want to try you must download it from here:
after install you can find this dll in:
"c:\Program Files (x86)\DebenuPDF Library\ActiveX\DebenuPDFLibraryAX1014.dll"
"c:\Program Files (x86)\DebenuPDF Library\Lite\DebenuPDFLibraryLite1012.dll"
!!! you can change DLL to newer version using _QPDF_NewLibraryPath_Commercial()
EDIT: actualy (19-06-2015) there is DebenuPDFLibraryAX1115.dll and DebenuPDFLibraryLite1115.dll
to use the commercial version you need to use the _QPdf_SetLicenseKey() AutoIt 18.104.22.168++ For UDF and examples download, and the current version information please go to download section:
The following information are outdated
I would like to present, the UDF for Debenu PDF Viewer SDK
You can also find more info here:
Debenu Quick PDF UDF
In order to download the current version of the UDF, vist download section.