Jump to content

Recommended Posts

Posted

Here:
https://github.com/nachbar/TRichViewToPdfUsingDebenu/blob/master/Unit1.cpp

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 ?

 

Regards,
mLIpok

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...