Try Dim qp1 As New iSED.QuickPDF Dim sPDFHei, sPDFWid As Double Dim iPgCnt As Integer qp1.UnlockKey("6510E9D5C3938A920B3A8D7293C6DF00") qp1.LoadFromFile(sFilePath & "\" & cmbArticles.Text) qp1.SetMeasurementUnits(0) iPgCnt = qp1.PageCount For i As Integer = 1 To iPgCnt 'MsgBox("pagecount=" & iPgCnt) qp1.SelectPage(i) 'MsgBox("PageNumber=" & i) sPDFHei = qp1.PageHeight : sPDFWid = qp1.PageWidth sPDFHei = Math.Round(sPDFHei, 2) : sPDFWid = Math.Round(sPDFWid, 2) ''If sPDFWid <> 8.26 And sPDFHei <> 11.69 Then If sPDFWid > 520 Or sPDFHei > 600 Then MsgBox("Article PDF size should not exit 7.22 x 8.33" & vbCrLf & "Problem in template:" & i) Exit Function End If Next qp1.clear() Checkpdfsize = True Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Information, "CheckPdfSize") End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)