you should do something like this:

[VBA]Sub pdf_doc()

Dim lr As Long, lc As Long
Dim mycolumnletter As String

lr = Cells(Rows.Count, 8).End(xlUp).Row
lc = Cells(Columns.Count, 8).End(xlToLeft).Column

If lc > 26 Then
mycolumnletter = Chr(Int((lc - 1) / 26) + 64) & Chr(((lc - 1) Mod 26) + 65)
Else
mycolumnletter = Chr(lc + 64)
End If


With ActiveSheet.PageSetup
.PrintArea = "a1:" & mycolumnletter & lr
.PrintTitleRows = "$1:$10"
.CenterFooter = "&P/&N"
.PrintQuality = 600
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ActiveWorkbook.Path & "saabx.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True

End Sub

[/VBA]