PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 18:44 
I downloaded the trial version for .NET pd4ml.pro.trial.dotnet20.351.
It is running fine when I debug it.
But after I deploy it to the server to let the manager decide if this is what we will purchase. It give error "The file is damaged and could not be repaired".
Is this a license issue or something else?
If it is a license issue, how can I get the trial version in our server for a certain time, so the decision making people can review it?

Thanks


  Subject: Re: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 18:52 
This is most likely happening because there is some stray HTML being output after/before the PDF stream is getting created.

I would recommend to save PDF to the hard drive and to open it with a text editor. Make sure it starts with %PDF-1.4 and ends with %%EOF


  Subject: Re: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 19:00 
It is running fine in my computer though.
Our application need to pop up this PDF report in the window, and let user to save it to their disks if they want to.
Below is the code I use to convet a html string to pdf:

...

MemoryStream mstr = new MemoryStream(Encoding.ASCII.GetBytes(strHtml));
pd4ml.render(mstr, outfile);

below is the value of strHtml in debug mode:
"<table id='detail' cellpadding='1px' cellspacing='1px' border='0' style='font-family: Verdana, Arial, sans-serif; font-size:12px;' width='700px'><tr>\r\n <td colspan='2'><img id='imgLogo' src='http://10.0.0.14/cappspurchasingtest/images/SSILLCSM.JPG' height='40px' width='120px' alt='Company logo' /> </td> <td colspan='4'>&nbsp;</td>\r\n </tr><tr>\r\n <td colspan='6' align='center'><b>NON-CONFORMANCE RECORD</b></td>\r\n </tr><tr>\r\n <td style='font-weight:bold;' >Status:</td>\r\n <td>VOIDED</td><td colspan='2'>&nbsp;</td>\r\n <td style='font-weight:bold;' >NCR #:</td>\r\n <td>25</td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Originator: </td>\r\n <td>brant </td> <td colspan='2'>&nbsp;</td>\r\n <td style='font-weight:bold;' >Origin Date:</td>\r\n <td>2/12/2010</td></tr>\r\n <tr>\r\n <td colspan='4'>&nbsp;</td>\r\n <td style='font-weight:bold;' >Print Date:</td>\r\n <td>2/17/2010</td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Part Number:</td>\r\n <td>01921231</td> <td colspan='2' align='center'>BR FR 1/4X7/8LG</td> <td colspan='2'>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >NCR Quantity:</td>\r\n <td>3.00</td> <td style='font-weight:bold;' >Advanced Deviation:</td>\r\n <td>No</td> <td style='font-weight:bold;' >Inspection Number:</td>\r\n <td></td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Document Type:</td>\r\n <td>Purchase Order</td> <td style='font-weight:bold;' >P/O,J/O,W/O#:</td>\r\n <td>10004</td> <td colspan='2'>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Supplier or Work Center:</td>\r\n <td>2419</td> <td colspan='2' align='center'>HOGGE PRECISION PARTS</td> <td colspan='2'>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Purchasing Agent:</td>\r\n <td>JES</td> <td colspan='2' align='center'>&nbsp;</td> <td colspan='2'>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td colspan='6' align='center' style='font-weight:bold' >REASON FOR REJECTION</td>\r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Reason Code(s): </td>\r\n <td colspan='5'></td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Drawing Specification:</td>\r\n <td colspan='5'>d</td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Problem / Descrepancy:</td> \r\n <td colspan='5'>d</td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Q / C Comments:</td> \r\n <td colspan='5'>d</td></tr>\r\n <tr>\r\n <td colspan='6'>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td colspan='6' style='font-weight:bold; text-align:center' >MATERIAL DISPOSITION</td> \r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Disposition Responsibility:</td>\r\n <td colspan='2'>Engineering</td> <td style='font-weight:bold;' >Disposition Code:</td> \r\n <td colspan='2'></td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Disposition By:</td>\r\n <td></td> <td style='font-weight:bold;' >Disposition Date:</td>\r\n <td></td> <td style='font-weight:bold;' >Rework/RMA#:</td>\r\n <td></td> </tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Disposition Comments:</td>\r\n <td colspan='5'></td></tr>\r\n <tr>\r\n <td style='font-weight:bold;' >Authorized By:</td>\r\n <td></td> <td style='font-weight:bold;' >Authorized Date:</td>\r\n <td></td> <td colspan='2'>&nbsp;</td> \r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td colspan='6' style='font-weight:bold; text-align:center;' >DISTRIBUTION LIST</td> \r\n </tr>\r\n <tr>\r\n <td colspan='6'><hr /></td>\r\n </tr>\r\n <tr>\r\n <td colspan='6'>brant, Charity Clear, </td></tr>\r\n <tr>\r\n <td colspan='6'><hr /></td> \r\n </tr></table>"


  Subject: Re: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 19:20 
Problem soved. Thanks a lot.


  Subject: Re: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 19:22 
Could you please post the "outfile" content here or send it to support pd4ml com.


  Subject: Re: Deploy in .net 2.0
   PostPosted: 17 Feb 2010, 19:23 
nereid wrote:
Problem soved. Thanks a lot.


Glad you solved it.



[Reply]     [ 6 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share