AnsweredAssumed Answered

is it possible to draw layers at different resolutions in PDF?

Question asked by alphamale on Apr 15, 2015

I think it is not but my boss doesn't believe me.

 

Here's some standard code for making a PDF:

 

Public Function createPDF()


Dim pActiveView As IActiveView

 

Dim pPixelBoundsEnv As IEnvelope = New Envelope

 

Dim exportRECT As tagRECT = New tagRECT

 

Dim iOutputResolution As Integer

Dim iScreenResolution As Integer

Dim hDC As Long

 

 

Dim pMxDoc As IMxDocument = My.ArcMap.Application.Document

 

Dim px1 As IExportPDF = New ExportPDF

 

Dim px2 As IExportPDF2 = New ExportPDF

 

Dim px3 As IExportPDF3 = New ExportPDF

 

 

Dim pExport As IExport = New ExportPDF

 

pExport.ExportFileName = "output.pdf"

 

 

iScreenResolution = 96

 

 

iOutputResolution = 600

'Can some layers be at 300 dpi and others at 600 dpi?

 

pExport.Resolution = iOutputResolution

 

With exportRECT

 

            .left = 0

 

            .top = 0

 

            .right = pActiveView.ExportFrame.right * (iOutputResolution / iScreenResolution)

 

            .bottom = pActiveView.ExportFrame.bottom * (iOutputResolution / iScreenResolution)

 

 

End With

 

 

 

 

pPixelBoundsEnv.PutCoords(exportRECT.left, exportRECT.top, exportRECT.right, exportRECT.bottom)

 

pExport.PixelBounds = pPixelBoundsEnv

 

 

 

 

 

hDC = pExport.StartExporting

 

 

 

pActiveView.Output(hdc,pExport.Resolution,exportRECT,Nothing, Nothing)

pExport.FinishExporting()

pExport.Cleanup()

 


createPDF = 1

 

End Function

 

--------------

Perhaps the purpose can be accomplished with

px1.Compressed (I assume you would want px1.Compressed = true)

px1.ImageCompression = (Adaptive, Deflate, JPEG, LZW, None, RLE)

JPEG is lossy....Obviously with None you get no compression.

LZW is lossless...not sure about Adaptive/Deflate/RLE

px3.JPEGCompressionQuality - how much loss are you willing to tolerate in exchange for smaller file size? 

Now any of these would affect your layers equally, no? 

 

 

 

Outcomes