<% Response.Expires = -1 Response.AddHeader "Cache-Control", "no-cache" Response.AddHeader "Cache-Control", "private" Response.AddHeader "Cache-Control", "no-store" Response.AddHeader "Cache-Control", "must-revalidate" Response.AddHeader "Cache-Control", "max-stale=0" Response.AddHeader "Cache-Control", "post-check=0" Response.AddHeader "Cache-Control", "pre-check=0" Response.AddHeader "Pragma", "no-cache" Response.AddHeader "Keep-Alive", "timeout=3, max=993" Response.AddHeader "Expires", "Sun, 08 May 1983 05:00:00 GMT" response.Charset="ISO-8859-1" %> <% id=request.querystring("id") pdfname=request.querystring("id")&"-"&Session.SessionID Set fso = CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder(Server.Mappath("./pdf/")) Set files = folder.Files For Each file in Files fecha1=datediff("n", file.DateCreated, now) if fecha1>=5 then fso.DeleteFile server.MapPath("./pdf")&"/"&file.Name ,true end if Next Set theDoc = Server.CreateObject("ABCpdf6.Doc") theDoc.Rect = "10 780 600 10" 'theDoc.AddGrid theDoc.Page = theDoc.AddPage() theURL = "http://www.automovilesdominguez.com/pdf.php?id="&id theDoc.HtmlOptions.BrowserWidth = 0 theID = theDoc.AddImageUrl(theURL,true,0,true) Do If Not theDoc.Chainable(theID) Then Exit Do theDoc.Page = theDoc.AddPage() theID = theDoc.AddImageToChain(theID) Loop tagRects = theDoc.HtmlOptions.GetTagRects(id) For Each theRect in tagRects theDoc.Rect.String = theRect.String theDoc.FrameRect Next theDoc.HtmlOptions.GetTagRects(ID) theDoc.HtmlOptions.GetScriptReturn(ID) theDoc.HtmlOptions.LinkPages For i = 1 To theDoc.PageCount theDoc.PageNumber = i theDoc.Flatten Next theDoc.Save Server.MapPath("pdf/"&pdfname&".pdf") response.Redirect("pdf/"&pdfname&".pdf") %>