logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mikhael  
#1 Posted : Friday, February 24, 2023 9:49:27 AM(UTC)
Mikhael

Rank: Newbie

Groups: Registered
Joined: 4/7/2021(UTC)
Posts: 6
Russian Federation

Hello,

I try use code below to scale page size till 11x17 inches, but output PDF file page looks like an empty page. Could you please assist?

Mikhael

Code:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Const sPDF = "C:\Test\Adden 5 - page 98.pdf"
Const sDstFolder = "C:\out"

Dim w = Inches2PDF(17)
Dim h = Inches2PDF(11)

Dim mx = New FS_MATRIX()
mx.SetIdentity()
mx.Scale(w, h)

Using doc = PdfDocument.Load(sPDF, New PdfForms())
For Each pdfiumPage In doc.Pages
Dim rcClip = New FS_RECTF(0, h, w, 0)
Dim rc = pdfiumPage.TransformWithClip(mx, rcClip)
pdfiumPage.Dispose()
Next

doc.Save(sDstFolder + "\test.pdf", SaveFlags.NoIncremental)
End Using
End Sub
Paul Rayman  
#2 Posted : Monday, March 6, 2023 10:28:04 PM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,095

Thanks: 7 times
Was thanked: 128 time(s) in 125 post(s)
Hi,

What is the value of variables "w" and "h"?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.