dim theData dim objDoc Set theDoc = Server.CreateObject("ABCpdf10.Doc") Set theDoc2 = Server.CreateObject("ABCpdf10.Doc") theDoc.HtmlOptions.BrowserWidth = 1300 ' apply a rotation transform w = theDoc.MediaBox.Width h = theDoc.MediaBox.Height l = theDoc.MediaBox.Left b = theDoc.MediaBox.Bottom theDoc.Transform.Rotate 90, l, b theDoc.Transform.Translate w, 0 ' rotate our rectangle theDoc.Rect.Width = h theDoc.Rect.Height = w 'theDoc.Rect.Inset 72, 144 theDoc.HtmlOptions.UseScript = true theDoc.HtmlOptions.AddLinks = true theDoc.HtmlOptions.DoMarkup = true theDoc.SetInfo 0, "CheckBgImages", "1" theID = theDoc.AddImageURL(webPageURL) Do theDoc.FrameRect If Not theDoc.Chainable(theID) Then Exit Do theDoc.Page = theDoc.AddPage() theID = theDoc.AddImageToChain(theID) Loop For i = 1 To theDoc.PageCount theDoc.PageNumber = i theDoc.Flatten Next 'theDoc.Append(theDoc2) ' can add text to the top of the document, advertising, etc theDoc.Save(Server.MapPath("/pdfs/" & strPDFname & ".pdf")) thedoc.clear thedoc2.clear set thedoc = nothing set thedoc2 = nothing set thedata = nothing
0 Comments
|