PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)
Moderators:PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
The VB example that comes with the SDK doesn't cope with PDF documents that contain both portrait and landscape pages. Portrait pages are printed correctly, but landscape pages are squeezed so that they fit horizontally on a portrait page. I rather want them to be rotated and thus printed at the same size as portrait pages.
Could anybody help me with the code? The SDK example starts nicely with the following code (frmMain.PrintPdfFile):
Thanks for Your help. - No, I'm not using the ActiveX because the component is integrated into a document management system that handles different types of documents (TXT, TIF, DOC, PDF, XLS ...) in precisely the same manner. Whatever document the user is displaying, printing, copying and so on, the user interface looks the same. Apart from the landscape problem, the DLL integrates seamlessly into this application.
....
For i = nStartPage To nEndPage ' existed code
StartPage pdlg.hdc
'
Dim doc_page_w As Double
Dim doc_page_h As Double
hr = PXCV_GetPageDimensions(m_Doc, i, doc_page_w, doc_page_h)
crp.flags = pxvrpf_UseVectorRenderer ' new code
If doc_page_w > doc_page_h Then
Dim tmp As Long
tmp = doc_page_w
doc_page_w = doc_page_h
doc_page_h = tmp
crp.flags = crp.flags Or pxvrpf_Rotate_Rotate90CCW
End If