Print Page | Close Window

How to get failed msg when API method returned 0??

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3854
Printed Date: 22 Nov 24 at 7:21PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to get failed msg when API method returned 0??
Posted By: fletchsod
Subject: How to get failed msg when API method returned 0??
Date Posted: 20 Oct 20 at 4:08PM
Is there an API that can give us a failed message when a method returned 0?  

There are some methods that returned 1 for success & 0 for error, they are 

   MergeDocument()
   LoadFromString()
   SetNeedAppearances()
   SetFormFieldValueByTitle()
   FlattenAllFormFields()

etc.

We would like to know why & see if the failed message give us hint on fixing the scripts that is causing the error.

Thanks.



Replies:
Posted By: mLipok
Date Posted: 20 Oct 20 at 4:34PM
https://www.debenu.com/docs/pdf_library_reference/LastErrorCode.php
https://www.debenu.com/docs/pdf_library_reference/LastRenderError.php


-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600


Posted By: Ingo
Date Posted: 20 Oct 20 at 10:22PM
Directly after the relevant function call.
For example:

//...
lv_ok := QP.LoadFromFile(Edit1.text, '');
lv_err := QP.LastErrorCode;       
if ( lv_err = 411 ) Then // File not found         
  begin
//...



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




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