itextsharp,我该如何... [英] itextsharp, How do I ...

查看:55
本文介绍了itextsharp,我该如何...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从网页和数组创建PDF.获取数据后,我将打开一个新的ASPX页面以执行所有自定义格式.这没有问题.问题是在数组中,获取数据后,我无法遍历数组并每次都打开新页面.

我使用Response.Redirect将数据加载到新页面,另存为PDF,然后重定向回首页,而无需从数组数据中创建其他PDF ...

这是我的一些代码:

I am creating a PDF from a web page, from an array. After I get the data, I open a new ASPX page to do all the custom formatting. This works with no issues. The problem is that in the array, after I get the data, I can''t loop through the array and open a new page each time.

I use a Response.Redirect to load data to the new page, save as a PDF, and then redirects back to the beginning page without creating additional PDFs from the array data...

Here is a bit of my code:

For Each dataRow As DataRow In tableReferalData.Rows
  Dim ReferralID As String = dataRow.Item(ReferralID).ToString

'blah blah additional code is here

Dim _ReferralSleeve As New ReferralSleeve.ReferralSleeve(ReferralID, leftvert, _
     rightvert, lv_01, rv_01, center_l1, center_l2, center_l3, _
     ls_id1, rv_complete_name, rv_complete_Addr, rv_complete_C_S_Z,_
     rv_complete_phone, bt_line1, bt_line2, bt_line3)

Session(referralsleeve) = _ReferralSleeve



Response.Redirect从上面获取数据并构建一个网页,然后将其转换为PDF并将其保存到目录中.

第一个PDF可以正确构建,但是由于无法弄清楚如何从下一页回到这一点而停止了.



Response.Redirect takes data from the above and builds a web page, I then convert it to a PDF and save it to a directory.

The first PDF builds correctly, but then stops as I can''t figure out how to get back to this point from the next page...

推荐答案

您好,

Hi,

Open your new page using new window or window.open() that page load your data and login into this to create a PDF.And the control of your original page will be there.


这篇关于itextsharp,我该如何...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆