簡體   English   中英

WebSupergoo ABCPDF自動生成pdf-即時添加頁面嗎?

[英]WebSupergoo ABCPDF Automatic pdf generation - Adding pages on the fly?

我有一個關於使用ABCPDF.dll構建動態PDF文檔的問題。

我了解基本知識,並且有一個可靠的解決方案。 我有一個新的要求,我需要將頁面動態添加到PDF文檔。

具體來說,我的PDF文檔是兩頁的。 第二頁需要是一個單獨的PDF文件,用戶將在其中添加一個或多個頁面。

我看了一下文檔和代碼示例,並看到了AddPage()方法。 似乎不太適合我的需要。

這是一個代碼示例:

         void Page_Load( object sender, System.EventArgs e )
    {
        int theID = 0;
        string theText = "This PDF file is generated by WebSupergoo ABCpdf.NET on the fly";
        Doc theDoc = new Doc();

        theDoc.Width = 4;
        theDoc.FontSize = 32;
        theDoc.Rect.Inset( 20, 20 );
        theDoc.FrameRect();
        theID = theDoc.AddHtml( theText );

        while ( theDoc.GetInfo( theID, "Truncated" ) == "1" )
        {
            theDoc.Page = theDoc.AddPage();
            theDoc.FrameRect();
            theID = theDoc.AddHtml( "", theID );
        }
        theDoc.Save( Server.MapPath( "textflow.pdf" ) );
        theDoc.Clear();

        Response.Write( "PDF file written<br>" );
        Response.Write( "<a href=\"textflow.pdf\">View PDF File</a>" );
    }

有人可以建議一種使用ABC PDF將頁面添加到PDF文檔的方法嗎? 上面的示例可能正在使用AddPage,但是我需要指定另一個PDF文件來動態添加。 PDF文件名可以更改。

謝謝。

謝謝。

我相信abcpdf允許您將PDF文檔合並到另一個文檔的末尾。 這里

如果我了解您的問題,則想將PDF添加到其他PDF的末尾。 如果這是您所需要的,則看起來Append方法就是您所需要的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM