Print Page | Close Window

DLL DPLCreateTable - Error 110

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=2537
Printed Date: 04 Apr 26 at 8:03PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DLL DPLCreateTable - Error 110
Posted By: dragon
Subject: DLL DPLCreateTable - Error 110
Date Posted: 23 Feb 13 at 12:31PM
I am using Visual Studio 2008 Visual C++ non-mfc.
 
Using dynamic DLL loading in my test application.
 
I have tested simple sample codes using  DPLDrawDataMatrixSymbol, DPLDrawText, DPLSetLineColor, pDPLDrawRotatedBox, etcs without issue. Generated PDF opens as expected.

However, when I start using DPLCreateTable function (convert from Page Layout - Create a Table Sample), Adobe Reader cannot open the generated PDF file and reported error 110 !
 
Am I missing on some setup codes to configure the Table ???
 
Below is my partial source code :
.....
....
typedef int (__stdcall *pFunctionAddress08)(int, int, int);
pFunctionAddress08 pDPLCreateTable;
....
typedef int (__stdcall *pFunctionAddress12)(int, int, int, int, double);
pFunctionAddress12 pDPLSetTableRowHeight;
pFunctionAddress12 pDPLSetTableColumnWidth
....
....
....LoadLibrary(.....
 
//********************************************//
//  Convert from Page Layout - Create a Table Sample    //
//********************************************//
bool CreatePDFTable(void)
{
int result;
 // CreateLibrary
 InstanceID=pDPLCreateLibrary();
 if (!InstanceID) return false;
 // Unlock library
 result=pDPLUnlockKey(InstanceID,"xxxxxxxxxxxxxxxxx");
 if (!result) return false;
 result = pDPLSetPageSize(InstanceID, "Letter");
 if (!result) return false;
 tableID = pDPLCreateTable(InstanceID, 5, 5);
 // Specify color and width of borders  
 result = pDPLSetTableBorderColor(InstanceID, tableID, 0, 0.3, 0.204, 0);
 result = pDPLSetTableBorderWidth(InstanceID, tableID, 0, 0.2);
 // Specify table row height and table column width
 result = pDPLSetTableRowHeight(InstanceID, tableID, 1, 5, 0);
 result = pDPLSetTableColumnWidth(InstanceID, tableID, 1, 5, 100);
// Specify a background color for the column headers
 result = pDPLSetTableCellBackgroundColor(InstanceID, tableID, 1, 1, 1, 5, 0.3, 0.7, 1.0);
 result = pDPLSetTableCellAlignment(InstanceID, tableID, 1, 1, 1, 5, 4);
// Setup the column headers and content for the first row
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 1, "<b>This Week</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 2, "<b>Last Week</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 3, "<b>Artist Name</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 4, "<b>Peak</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 5, "<b>Weeks On</b>");
// Insert the content for the second row
 result = pDPLSetTableCellContent(InstanceID, tableID, 2, 1, "1");
 result = pDPLSetTableCellContent(InstanceID, tableID, 2, 2, "1");
 result = pDPLSetTableCellContent(InstanceID, tableID, 2, 3, "<b>The Black Eyed Peas</b><br>Boom Boom Pow");
 result = pDPLSetTableCellContent(InstanceID, tableID, 2, 4, "<b>1</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 2, 5, "<b>11</b>");
// Insert the content for the third row
 result = pDPLSetTableCellContent(InstanceID, tableID, 3, 1, "2");
 result = pDPLSetTableCellContent(InstanceID, tableID, 3, 2, "3");
 result = pDPLSetTableCellContent(InstanceID, tableID, 3, 3, "<b>Missy Higgins</b><br>Life is a rainbow");
 result = pDPLSetTableCellContent(InstanceID, tableID, 3, 4, "<b>2</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 3, 5, "<b>8</b>");
// Insert the content for the fourth row
 result = pDPLSetTableCellContent(InstanceID, tableID, 4, 1, "3");
 result = pDPLSetTableCellContent(InstanceID, tableID, 4, 2, "2");
 result = pDPLSetTableCellContent(InstanceID, tableID, 4, 3, "<b>Silverchair</b><br>The Door");
 result = pDPLSetTableCellContent(InstanceID, tableID, 4, 4, "<b>3</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 4, 5, "<b>7</b>");
// Insert the content for the fourth row
 result = pDPLSetTableCellContent(InstanceID, tableID, 5, 1, "4");
 result = pDPLSetTableCellContent(InstanceID, tableID, 5, 2, "4");
 result = pDPLSetTableCellContent(InstanceID, tableID, 5, 3, "<b>Rolling Stones</b><br>Sweet Virginia");
 result = pDPLSetTableCellContent(InstanceID, tableID, 5, 4, "<b>4</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 5, 5, "<b>19</b>");
// Draw the table onto the document
 result = pDPLSetOrigin(InstanceID, 1);
 if (!result) return false;
 result = pDPLDrawTableRows(InstanceID, tableID, 50, 50, 400, 1, 0);
 result=pDPLSaveToFile(InstanceID,"HelloFromDLL.pdf");
 if (!result) return false;
 // Release Library
 result = pDPLReleaseLibrary(InstanceID);
 if (!result) return false;
 return true;
}
 
Please advise.
Thanks in advance.
 
Best regards
Trial User
 
 



Replies:
Posted By: Ingo
Date Posted: 23 Feb 13 at 5:03PM
Hi Dragon!

You should search in the forum with 110!
We had it already in the far past.
Seems it has to do with used fonts for example?
I can't read about font-functionality in your code?
Another idea:
Adobe tells on their side that error 110 means
"error while communicating with adobe.com"?!

Cheers and welcome here,
Ingo



Posted By: dragon
Date Posted: 23 Feb 13 at 10:55PM
Hi Ingo,
 
Thanks for your reply and fast response !
 
As per your advice, I have added the font requirement, however it is still not successful.
 
Source Code :
 
ool CreatePDFTable(void)
{
int result;
 // CreateLibrary
 InstanceID=pDPLCreateLibrary();
 if (!InstanceID) return false;
 // Unlock library
 result=pDPLUnlockKey(InstanceID,"************");
 if (!result) return false;
 result = pDPLSetPageSize(InstanceID, "Letter");
 if (!result) return false;
 FontID = pDPLAddStandardFont(InstanceID, 11);
 if (!FontID) return false;
 result = pDPLSelectFont(InstanceID, FontID);
 if (!result) return false;
 result = pDPLSetTextSize(InstanceID,12);
 if (!result) return false;
 result = pDPLSetTextColor(InstanceID,1,0,0.5);
 if (!result) return false;
 result = pDPLSetLineColor(InstanceID,0.2,0.4,1);
 if (!result) return false;
 result = pDPLAddFormFont(InstanceID, FontID);
 if (!result) return false;

 tableID = pDPLCreateTable(InstanceID, 5, 5);
 // Specify color and width of borders  
 result = pDPLSetTableBorderColor(InstanceID, tableID, 0, 0.3, 0.204, 0);
 result = pDPLSetTableBorderWidth(InstanceID, tableID, 0, 0.2);
 // Specify table row height and table column width
 result = pDPLSetTableRowHeight(InstanceID, tableID, 1, 5, 0);
 result = pDPLSetTableColumnWidth(InstanceID, tableID, 1, 5, 100);
// Specify a background color for the column headers
 result = pDPLSetTableCellBackgroundColor(InstanceID, tableID, 1, 1, 1, 5, 0.3, 0.7, 1.0);
 result = pDPLSetTableCellAlignment(InstanceID, tableID, 1, 1, 1, 5, 4);
// Setup the column headers and content for the first row
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 1, "<b>This Week</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 2, "<b>Last Week</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 3, "<b>Artist Name</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 4, "<b>Peak</b>");
 result = pDPLSetTableCellContent(InstanceID, tableID, 1, 5, "<b>Weeks On</b>");
.....
.....
// Draw the table onto the document
 result = pDPLSetOrigin(InstanceID, 1);
 if (!result) return false;
 result = pDPLDrawTableRows(InstanceID, tableID, 50, 50, 400, 1, 0);
 result=pDPLSaveToFile(InstanceID,"HelloFromDLL.pdf");
 if (!result) return false;
 // Release Library
 result = pDPLReleaseLibrary(InstanceID);
 if (!result) return false;
 return true;
}
 
Please advise.
Thanks in advance !
 
Best regards
Dragon


Posted By: dragon
Date Posted: 23 Feb 13 at 11:02PM
Originally posted by Ingo Ingo wrote:

Hi Dragon!

You should search in the forum with 110!
We had it already in the far past.
Seems it has to do with used fonts for example?
I can't read about font-functionality in your code?
Another idea:
Adobe tells on their side that error 110 means
"error while communicating with adobe.com"?!

Cheers and welcome here,
Ingo

 
Hi Ingo,
 
By the way, I just did the search. It did not highlight any other threads except mine.
Thanks.
 
Best regards
Dragon



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