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!
![]() |
DLL DPLCreateTable - Error 110 |
Post Reply
|
| Author | |
dragon
Beginner
Joined: 23 Feb 13 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Topic: DLL DPLCreateTable - Error 110Posted: 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 |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
dragon
Beginner
Joined: 23 Feb 13 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
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
Edited by dragon - 23 Feb 13 at 10:55PM |
|
![]() |
|
dragon
Beginner
Joined: 23 Feb 13 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 13 at 11:02PM |
Hi Ingo, By the way, I just did the search. It did not highlight any other threads except mine. Thanks. Best regards Dragon
|
|
![]() |
|
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