Print Page | Close Window

Debugging, Errorlog Howto?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3016
Printed Date: 25 Jan 26 at 7:19PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Debugging, Errorlog Howto?
Posted By: kochi09
Subject: Debugging, Errorlog Howto?
Date Posted: 24 Nov 14 at 10:34AM
Hi There,

in our company, we use the quickpdflibrary to print text to existing pdfs on our Webserver via php.
Now I have to edit or to fix files that were created by other guys.
I´m absolutely new to the pdflibrary and need some help.

I used the search- function to figure out how to enable an errorlog or something else, but there was no matching result for me.

My problem:

# using a ttf-font, wich is in the same folder like the script - SPK Logos.ttf
# --------------------------------------------------------------------------------------
$slogo = $qp->AddTrueTypeFont("SPK Logos",1);

$qp->SelectFont($slogo);
$qp->SetTextColorCMYK(0,0,0,0);
$qp->SetTextSize(30*$faktor);
$qp->DrawText($posx-(4.8*$faktor), $posy-10, 'p');


The rendered Letter 'p' in my pdf-file used the default font and not the selected font SPK Logos.

The php-errorlog is empty an in the quickpdf programfolder is no logfile.

Any ideas?

thx marco






Replies:
Posted By: Ingo
Date Posted: 26 Nov 14 at 11:58AM
Hi Marco,
 
QuickPDF offers LastErrorCode:
http://www.debenu.com/docs/pdf_library_reference/LastErrorCode.php" rel="nofollow - http://www.debenu.com/docs/pdf_library_reference/LastErrorCode.php
You can use this function after important process-steps to see if it's still alright.
Another idea is to check the returning values from the functions.
For example the returning value 0 by LoadFromFile means that there's an error...
 
Cheers and welcome here,
Ingo
 


-------------
Cheers,
Ingo



Posted By: kochi09
Date Posted: 26 Nov 14 at 12:41PM
HI Ingo,

thanks for your idea. That was the first thing I tried. The return values were all id numbers. No 0 value and when I called LastErrorCode the whole script stopped.

In the meantime I fixed the problem by using the method AddOpenTypeFontFromFile instead of  addTrueTypeFont . That is working, but I don´t understand why the old function isn´t working anymore.

regards,
Marco



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk