Save HTML to Pdf ABCPdf 4
        Posted  
        
            by daisy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by daisy
        
        
        
        Published on 2009-09-28T21:28:26Z
        Indexed on 
            2010/05/22
            3:10 UTC
        
        
        Read the original article
        Hit count: 711
        
abcpdf
Hello All, I'm using following code to save html to pdf file. But it fails to compile at if (!theDoc.Chainable(theID)). I do have using WebSupergoo.ABCpdf4; added at the begining of the code. Is this version issue? Is there any other method to save HTML string to pdf file in ABCPdf 4.
Error Message is "'WebSupergoo.ABCpdf4.Doc' does not contain a definition for 'Chainable' and no extension method 'Chainable' accepting a first argument of type 'WebSupergoo.ABCpdf4.Doc' could be found (are you missing a using directive or an assembly reference?)
Doc theDoc = new Doc();
theDoc.Rect.Inset(10, 50);
theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageHtml(str);
while (true)
{
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
theDoc.Save("path where u want 2 save" + ".pdf");
theDoc.Clear();
All the help is appreciated.
© Stack Overflow or respective owner