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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Problem with create pdf document
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with create pdf document

 Post Reply Post Reply
Author
Message
AlexCasual View Drop Down
Beginner
Beginner


Joined: 10 Feb 12
Location: Belarus,Minsk
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexCasual Quote  Post ReplyReply Direct Link To This Post Topic: Problem with create pdf document
    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!
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 11 Feb 12 at 2:24AM
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()

Andrew.
Back to Top
AlexCasual View Drop Down
Beginner
Beginner


Joined: 10 Feb 12
Location: Belarus,Minsk
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexCasual Quote  Post ReplyReply Direct Link To This Post Posted: 11 Feb 12 at 5:44PM
Thank you Andrew!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store