Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
How can I use RenderPageToDC on Mac? |
Post Reply ![]() |
Author | |
Aleksandr ![]() Beginner ![]() Joined: 26 Aug 13 Location: Russia Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 26 Aug 13 at 7:44AM |
I use methods RenderPageToDC, SetRenderDCOffset and SetRenderScale on windows platform. The "Debenu Quick PDF Library 9.15 Mac Reference Guide.pdf" contains functions RenderPageToDC, SetRenderDCOffset, SetRenderScale. What is "DC - The device context handle" on mac? CGConextRef? Can you tell how to use it, or to show an example?
Your readme.txt contains:
"The Mac version of the library is still in beta and is missing a few of the features that the Windows version has. The following functions are not currently supported in the Mac version: AddSubsettedFont ... AddTrueTypeSubsettedFont DARenderPageToDC ... PrintDocument PrintOptions ..." is this true? If it's true, then when will they become available? |
|
![]() |
|
Aleksandr ![]() Beginner ![]() Joined: 26 Aug 13 Location: Russia Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Hi Alexander,
Thanks for your email. > What is “DC – The device context handle” on mac? > CGConextRef? Can you tell how to use it, or to > show an example? You can get the device context on Mac using CGContextRef. We don’t have any sample code for this at the moment but I’ll see if we can create some for you today to help you get started. We hope to add support for the other functions in the Ma version later in the year. Cheers, - Rowan. |
|
![]() |
|
Aleksandr ![]() Beginner ![]() Joined: 26 Aug 13 Location: Russia Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
I'm sorry, can I ask one more question?
In readme.txt: The dylib for Debenu Quick PDF Library is 32-bit only and so the XCode project must be set to 32-bit mode. When you plan to release a 64 bit version? thank you very much Cheers |
|
![]() |
|
Aleksandr ![]() Beginner ![]() Joined: 26 Aug 13 Location: Russia Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
example 1:
_QP = new DebenuPDFLibraryDylibCPPClass0915(dllFileName); if (!_QP->LibraryLoaded()) { return; } if (_QP->UnlockKey(strLicenseKey) != 1) { return ; } if (_QP->LoadFromFile(L"/Users/aleksandr/Desktop/debenu_quick_pdf_library_mac/license.pdf", L"") == 0) { return; } currentDocumentID =_QP->SelectedDocument(); _QP->SetRenderDCErasePage(1); std::cout << "PdfTool::openFile: SelectedDocument = " << currentDocumentID << std::endl; std::cout << "PdfTool::openFile: DocumentCount = " << _QP->DocumentCount() << std::endl; std::cout << "PdfTool::openFile: PageCount = " << _QP->PageCount() << std::endl; std::cout << "_QP->SelectPage="<< _QP->SelectPage(1) << std::endl; std::cout << "_QP->SelectedPage=" << _QP->SelectedPage() << std::endl; std::cout << "_QP->PageWidth="<< _QP->PageWidth() << std::endl; std::cout << "_QP->PageHeight="<< _QP->PageHeight() << std::endl; _QP->SetRenderScale(1.0); std::string buf = _QP->RenderPageToString(72, 1 , 5); example 2: - (void)drawRect:(NSRect)dirtyRect { // Drawing code here. // Get current context CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
_QP->RenderPageToDC( 72, 1, (int)context); } RenderPageToString and RenderPageToDC do not work! |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store