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 create pdf document |
Post Reply |
Author | |
AlexCasual
Beginner Joined: 10 Feb 12 Location: Belarus,Minsk Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 10 Feb 12 at 3:40PM |
Hello guys! I have code : bool CreateFormatText( std::wstrint& file, std::wstrint& text, int x, int y) { #ifdef _WIN64 QuickPDFDLL0813 QP(L"QuickPDF64DLL0813.dll"); #else QuickPDFDLL0813 QP(L"QuickPDFDLL0813.dll"); #endif // Library key std::wstring strLicenseKey = L"my_key"; int iResult = QP.UnlockKey(strLicenseKey); if(iResult != 1) { return false; } QP.NewDocument(); QP.SetOrigin(1); QP.AddImageFromFile(file.c_str(), 0); int lWidth = QP.ImageWidth(); int lHeight = QP.ImageHeight(); QP.SetPageDimensions(lWidth,lHeight); QP.DrawImage(0, 0, lWidth, lHeight); QP.DrawText(x,y,text); std::wstring pdf = file; pdf.append(L"pdf"); QP.SaveToFile(pdf.c_str()); return true; } And when i try call CreateFormatText() in cycle more than once,saved pdf-files superimposed one on one...And i have incorrectpdf-files! Please help shoot this problem!
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
This link has all the functions and logic to create a multipage PDF file at the correct size. The important functions are
QP.NewPage(); QP.ImageHorizontalResolution() QP.RemoveDocument() Andrew.
|
|
AlexCasual
Beginner Joined: 10 Feb 12 Location: Belarus,Minsk Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Thank you Andrew!
|
|
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