Is there anyone that used pdfcreactivex.dll inside a cpp program, without including it in a form, and can give me a sample.
What I want to do is to use the pdfcreactivex to load a specific page from a pdf and send to a printer hDC.
Thanks for any help.
Flavio
Using pdfcreactivex.dll in cpp program
Hello,
To obtain the .h and cpp files for the object and pdfcreator classes please follow the steps below:
In VS 6.0, from the top menu select “Add to Project†then “Components and Controlsâ€. In the resulting dialog box select the “Registered ActiveX Controls†folder and insert the “PDFCreactiveX classâ€. This will also create the .h and cpp files for the object and pdfcreator classes and add them to your project.
This will give you access the PDF Creator without adding the component a form.
Hope this helps?
To obtain the .h and cpp files for the object and pdfcreator classes please follow the steps below:
In VS 6.0, from the top menu select “Add to Project†then “Components and Controlsâ€. In the resulting dialog box select the “Registered ActiveX Controls†folder and insert the “PDFCreactiveX classâ€. This will also create the .h and cpp files for the object and pdfcreator classes and add them to your project.
This will give you access the PDF Creator without adding the component a form.
Hope this helps?
Alternately you can do it all in code using a #import directive like:
and then create your objects like:
You may not have to include those renames depending on the headers you have included.
Code: Select all
#import "pdfcreactivex.dll" rename("GetObject", "PDFGetObject") rename("TextOut", "PDFTextOut") rename("GetCharWidth", "PDFGetCharWidth") rename("DrawText", "PDFDrawText")
and then create your objects like:
Code: Select all
HRESULT hr = m_PdfObj.CreateInstance(_T("PDFCreactiveX.PDFCreactiveX.4"));
ASSERT(SUCCEEDED(hr));
_bstr_t name = _T("PDF Creator Evaluation license");
_bstr_t key = _T("Long license snipped");
hr = m_PdfObj->SetLicenseKey(name, key);
ASSERT(SUCCEEDED(hr));