Link to home
Start Free TrialLog in
Avatar of Tra71
Tra71

asked on

Compressing PDFs

Hi,

Is there a way of compressing a pdf at the point of creating it?  The PDFs being created are too large...

We're using Persits AspPDF.

Many thanks


Set objPDF = Server.CreateObject("Persits.Pdf")
		Set objDoc = objPDF.CreateDocument
		
	'Get HTML stream to populate PDF...
		If Request.QueryString("Orient") = "L" Then
			objDoc.ImportFromUrl strHTML, "landscape=true; PageWidth=841; PageHeight=595; TopMargin=36; BottomMargin=36;"
		Else
			objDoc.ImportFromUrl strHTML, "PageWidth=595; PageHeight=841; TopMargin=36; BottomMargin=36;"
		End If
		
	'Check for Client...

		Set objConn = Server.CreateObject("ADODB.Connection") : objConn.Open appDBConn
		Set objRS = Server.CreateObject("ADODB.Recordset") : Set objRS.ActiveConnection = objConn
		
		Set Param = objDoc.ImportInfo
		
		Index = Param("Page")
		Y = Param("Y")
		X = 0
		
		Set Page = objDoc.Pages(Index)
		
		objRS.CursorLocation = adUseServer : objRS.Cursortype = adOpenStatic : objRS.Locktype = adLockOptimistic

Open in new window

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What is the Java connection?
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial