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!
Problem with SETPDFAMode |
Post Reply |
Author | |
josepmz
Beginner Joined: 03 Oct 11 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 03 Oct 11 at 11:16AM |
Hello,
I'm evaluating QuickPDFLibrary, I think that is a very good library. Great Joob. I've problems with QuickPDFDLL0811.dll in C++ version (MS 2008); When I try to use SETPDFAMode and save the document, the document is not PDF/A compliance. Is any limitation with Evaluation Keys? Any help wold be apreciated My code: #include "stdafx.h" #include "QuickPDFDLL0811.h" std::wstring Utf8ToUtf16(const std::string &s) { std::wstring ret; int len = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.length(), NULL, 0); if (len > 0) { ret.resize(len); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.length(), const_cast<wchar_t*>(ret.c_str()), len); } return ret; } std::string Utf16ToUtf8(const std::wstring &s) { std::string ret; int len = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), s.length(), NULL, 0, NULL, NULL); if (len > 0) { ret.resize(len); WideCharToMultiByte(CP_UTF8, 0, s.c_str(), s.length(), const_cast<char*>(ret.c_str()), len, NULL, NULL); } return ret; } int _tmain(int argc, _TCHAR* argv[]) { QuickPDFDLL0811 QP(Utf8ToUtf16("QuickPDFDLL0811.dll")); int iResult = QP.UnlockKey(Utf8ToUtf16("MyRegKey")); QP.SetPDFAMode(2); QP.SetOrigin(1); int fontID1 = QP.AddTrueTypeFont(Utf8ToUtf16("Times New Roman"), 1); QP.SelectFont(fontID1); QP.DrawText(25, 25, Utf8ToUtf16("This text was drawn using the DrawText function.")); if(QP.SaveToFile(Utf8ToUtf16("PDF-A_Document.pdf"))==1) { _tprintf(_T("grabado\n")); } else { _tprintf(_T("no grabado\n")); } return 0; } Edited by Ingo - 03 Oct 11 at 10:25PM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Josep!
Who tells you that the resulting document isn't real PDF/A? With AddTrueTypeFont you won't EMBED the font and embedding the used fonts is necessary to get a PDF/A-document. Cheers and welcome here, Ingo |
|
josepmz
Beginner Joined: 03 Oct 11 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Hi Ingo,
My document is not PDF/A beause I don't see legend on Acrobat Reader that says: "The file you have opened complies with the PDF/A standard and has been opened read-only to prevent modificacion. My code is based on samples at QuickPDF Library 8.11 console (2.11), on Document Management/Create PDF-A Document. When I run this sample, the PDF/A is correct, but when I run in my Visual Studio 2008 c++ project, it run but is not PDF/A compliance. When I created this code on QPL console it works fine, and the PDF is PDF/A: QP.SetPDFAMode(2); QP.SetOrigin(1); var fontID1 = QP.AddTrueTypeFont("Times New Roman", 1); QP.SelectFont(fontID1); QP.DrawText(25, 25, "This text was drawn using the DrawText function."); QP.SaveToFile(GetOutputFolder() + "PDF-A_Document.pdf"); DisplayPDFReader(GetOutputFolder() + "PDF-A_Document.pdf"); thanks Ingo, any help would be apreciated. |
|
josepmz
Beginner Joined: 03 Oct 11 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Hi,
anybody can help me? I can't create PDF/A documents in Visual Studio 2008 c++ with QuickPdfLibrary 8.11 o 8.12, it seems its ok, but the PDF/A is not created. My sample code is on firts post. Thanks! |
|
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