首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SumatraPDF横向布局被裁剪

SumatraPDF横向布局被裁剪
EN

Stack Overflow用户
提问于 2016-06-06 22:18:25
回答 1查看 390关注 0票数 0

我试图使用SumatraPDF从VB.Net页面打印景观布局,但页面被剪切。如果我打开SumatraPDF可执行文件并从app打印同一页,它会工作得很好。下面是我使用的命令:

代码语言:javascript
复制
 Private Sub PrintReport()
    Try
        Dim sPath As String = Request.PhysicalApplicationPath.ToString() + "ReportOutput\"           
        Dim command As String = """" + sPath + "SumatraPDF.exe"" -print-to """ + Me.Printer + """ """ + sPath + Me.Report + """ -print-settings ""fit""  "

        //command looks like:
        //"C:\Dev\Project\ReportOutput\SumatraPDF.exe" -print-to "\\Network\My Printer" "C:\Dev\Project\ReportOutput\card1.pdf" -print-settings "fit"  

        Shell(command)
    Catch ex As Exception
        Logger.LogError(ex)
    End Try
End Sub 

从命令行看起来,设置"fit“不起作用。在不打开系统打印对话框的情况下,我可以尝试从服务器端打印PDF文档的其他哪些选项?或者,我如何编辑我使用的命令,使其适用于水平布局?谢谢

EN

回答 1

Stack Overflow用户

发布于 2016-09-03 16:24:56

看看this吧。在第128行,您有一个const,其中包含参数的所有命令行可能值。

"content\0fitcontent\0fit-content\0";静态常量char*

= "fit page\0fit page\0fit-page\0fit width\0fit width\0fit-width\0fit“char=”fit page\0fit-page\0fit width\0fit“char

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37659829

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档