The code below will help you to implement an VB6 app to get PDF page width and height. What is ByteScout PDF To HTML SDK? It is the SDK for PDF to HTML conversin. Generates static HTML version of input PDF and reconstructs all visual layout, text positions, vector and raster drawings, images, and form elements. Generated HTML requires no special software and can be viewed in any Internet browser. It can help you to get PDF page width and height in your VB6 application.
This code snippet below for ByteScout PDF To HTML SDK works best when you need to quickly get PDF page width and height in your VB6 application. In your VB6 project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for VB6 will do the whole work for you to get PDF page width and height.
ByteScout PDF To HTML SDK free trial version is available on our website. VB6 and other programming languages are supported.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
VERSION 5.00 Begin VB.Form Form1 Caption = "GetPageWidthAndHeight" ClientHeight = 1320 ClientLeft = 120 ClientTop = 465 ClientWidth = 4440 LinkTopic = "Form1" ScaleHeight = 1320 ScaleWidth = 4440 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmd_get_page_width_and_height Caption = "Get Page Width And Height" Height = 855 Left = 480 TabIndex = 0 Top = 240 Width = 3495 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub cmd_get_page_width_and_height_Click() ' Hanlde Error On Error GoTo ErrorHandler: ' Create Bytescout.PDF2HTML.HTMLExtractor object Set extractor = CreateObject("Bytescout.PDF2HTML.HTMLExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Set HTML with CSS extraction mode extractor.ExtractionMode = 1 ' Load sample PDF document extractor.LoadDocumentFromFile ("sample2.pdf") ' read width and height of page #0 from PDF ' and show default output width and calculated page height MsgBox "Page #0" & vbCRLF & "Page height = " & CStr(extractor.GetPageHeight(0)) & vbCRLF & "Page width = " & CStr(extractor.GetPageWidth(0)) & vbCRLF & "Output width =" & CStr(extractor.OutputPageWidth) & vbCRLF & "Output Page Height = " & CStr(extractor.GetOutputHTMLPageHeight(0)) Set extractor = Nothing ' Close form Unload Me ErrorHandler: If Err.Number <> 0 Then MsgBox Err.Description, vbInformation, "Error" End If End Sub
60 Day Free Trial or Visit ByteScout PDF To HTML SDK Home Page
Explore ByteScout PDF To HTML SDK Documentation
Explore Samples
Sign Up for ByteScout PDF To HTML SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation Reference=*\G{3D7BFCBE-A112-4953-B4B0-83647F86C919}#9.1#0#..\..\..\..\..\..\..\..\..\WINDOWS\SYSWOW64\Bytescout.PDF2HTML.tlb#ByteScout PDF To HTML SDK [TRIAL] Form=Form1.frm Startup="Form1" Command32="" Name="GetPageWidthAndHeight" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Hiren" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1
60 Day Free Trial or Visit ByteScout PDF To HTML SDK Home Page
Explore ByteScout PDF To HTML SDK Documentation
Explore Samples
Sign Up for ByteScout PDF To HTML SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF To HTML SDK Home Page
Explore ByteScout PDF To HTML SDK Documentation
Explore Samples
Sign Up for ByteScout PDF To HTML SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples