Abro el pdf con el componente gb.pdf perfectamente hago zoom etc pero a la hora de imprimir con la suficiente calidad.
He probado con otra impresora distinta y sale igual.
El codigo esta basado en el ejemplo de gambas PDFViewer
el codigo para visualizar el pdf en el picturebox:
Public Sub RenderPage()
'---------------------------------------------------------------------------
'This function is called everytime something changed for example a new search result has to be displayed or the page
'has canged the parameters FoundText and Casesensetivity are only of interrest if the funktion is called from a search frunction
'--------------------------------------------------------------------------
Dim hPic As Picture
Dim Bc As Integer
ScrollXPositionBeforeZoom = ScrollView1.ScrollX / ScrollView1.ScrollWidth
ScrollYPositionBeforeZoom = ScrollView1.ScrollY / ScrollView1.ScrollHeight
If CurrentZoom > 0.0 Then
hPdf.Zoom = CurrentZoom
Else
Message.Error("Can't set zoom to " & CurrentZoom, "OK")
Endif
lblInfo.Text = " of" & " " & hPdf.Count
If txtGotoPage.text <> CurrentPage Then txtGotoPage.text = CurrentPage 'if the parameter currentPage is different from the current page the current page gets changed
hPic = hPdf[CurrentPage].Image.Picture
PictureBox1.Picture = hPic
PictureBox1.Resize(hPdf[CurrentPage].Width, hPdf[CurrentPage].Height)
Form_Resize()
Catch
Message.Info("An error occurred whilst trying to view the document.\n\nIf this persists please report this problem.")
End
'---------------------------------------------------------------------------
'This function is called everytime something changed for example a new search result has to be displayed or the page
'has canged the parameters FoundText and Casesensetivity are only of interrest if the funktion is called from a search frunction
'--------------------------------------------------------------------------
Dim hPic As Picture
Dim Bc As Integer
ScrollXPositionBeforeZoom = ScrollView1.ScrollX / ScrollView1.ScrollWidth
ScrollYPositionBeforeZoom = ScrollView1.ScrollY / ScrollView1.ScrollHeight
If CurrentZoom > 0.0 Then
hPdf.Zoom = CurrentZoom
Else
Message.Error("Can't set zoom to " & CurrentZoom, "OK")
Endif
lblInfo.Text = " of" & " " & hPdf.Count
If txtGotoPage.text <> CurrentPage Then txtGotoPage.text = CurrentPage 'if the parameter currentPage is different from the current page the current page gets changed
hPic = hPdf[CurrentPage].Image.Picture
PictureBox1.Picture = hPic
PictureBox1.Resize(hPdf[CurrentPage].Width, hPdf[CurrentPage].Height)
Form_Resize()
Catch
Message.Info("An error occurred whilst trying to view the document.\n\nIf this persists please report this problem.")
End
El codigo para imprimir
Public Sub Printer_Begin()
Inc Application.Busy
hPrinter.Count = hPdf.Count
printerZoom = hPdf.Zoom ' guardamos el zoom para ajustarlo despues de imprimir
hPdf.Zoom = 1 '
End
Public Sub Printer_Draw()
If Not hPdf.Ready Then Return
hImage = hPdf[hPrinter.Page].Image
Paint.DrawImage(hImage, 0, 0, hImage.Width, hImage.Height)
End
Public Sub Printer_End()
hPdf.Zoom = CurrentZoom
Dec Application.Busy
End
También a ver si alguno sabéis como averiguar los margenes mínimos de la impresora