ITextSharp Conversion From Table To PdfPTable?

Dec 11, 2009

I have an old ASP.NET project originally done in ASP.NET 1.1 w/ iText.NET and converted to .NET 2.0 and iTextSharp 4.1.6.0. It uses lots of Table (I'm assuming pdfptable wasn't an option at the time it was created.) I am trying to convert this code to use the latest iTextSharp 5.0.0 dll and now see Table and cell have been removed. I started converting it anyway and soon found there is no equivalent to a lot of the functionality that Table offered. Mainly AddCell no longer allows a col,row setting. There are literally thousands of these calls in this code and the posibility of changing it to generate linearly row by row looks hopeless at the moment. The current code looks something like:

Dim myTable As New Table(NumReq + 2, IngDS.Tables(0).Rows.Count + 3)
myTable.SetWidths(Width)
myTable.Width = 100
myTable.Padding = 2

[code].....

View 1 Replies


ADVERTISEMENT

Itextsharp Getting Position Of Pdfptable

Sep 3, 2009

in my document i am creating 3-4 pdfptables. at design time i dont know the size of the tables. i need to place the 2nd table right after the first, but i dont know the position of the first (i cant calculate it because i dont know how big it is). how do i know where to place the second table?

View 2 Replies

Itextsharp Using Pdfptable As A 2x2 Matrix?

Sep 3, 2009

how do i use pdfptable as a real table (A x B) instead of just (A x A)

declaring it this way gives me just one row:

Dim datatable As PdfPTable = New PdfPTable(4)

how can i declare it so that it has multiple rows and multiple columns?

View 1 Replies

Itextsharp: Default Pdfptable Filling?

Sep 3, 2009

if i define a table like this:

Dim datatable As PdfPTable = New PdfPTable(4)

and i dont have 4 cells to add in it, how can i make it so that it automatically fills the cell if there are not enough cells?i am finding that unless i have at least 4 cells in there, it wont display it?how do i figure out which cells are blank?

View 2 Replies

Winforms - Itextsharp: Pdfptable.writeselectedrows?

Sep 3, 2009

can show me documentation on this method? i have the following line:

datatable.WriteSelectedRows(0, -1, document.LeftMargin, document.TopMargin, writer.DirectContent) and it doesnt seem to matter whether its topmargin or bottommargin, it puts it at the bottom of the page.

View 1 Replies

Itextsharp: Changing Font Size Of Pdfptable?

Sep 3, 2009

how do i set the font for a pdfptable?

View 3 Replies

Itextsharp: Getting Total Height Of Table?

Dec 30, 2009

i need to place table2 after the end of table1. i do not know the height of table1. how do i get the height of table1? in vb.net

View 1 Replies

Creating Table Of Contents With Pagenumbers For A Pdf Document Using Itextsharp?

Apr 7, 2011

i am trying to create a vb application which creates pdf documents by taking xmls as input.I want to get the table of contents for the pdf being created in the following format

heading1 ----------------page number
heading2---------------page number
heading3-----------------page number

using the chapters and section functions of itextsharp , all i can get is

heading1
heading2
heading3

getting the page numbers beside the appropriate entry..!??

View 1 Replies

VS 2010 : Empty Dataset Conversion To Table?

Jan 13, 2012

I inherited a program that retrieves 3 datasets from our vendors' web services, converts it to a table and then merges the 3 tables before exporting into xml from the resulting combined table. The problem I am having is that when web services returns an empty dataset the program crashes in the attempt to create a table from the empty dataset.How do I modify this code to either create an empty table or recognize the empty dataset and skip around that particular table creation, merge and removal? There is always data in at least one of the datasets.

foreach (Branch branch in branches)
{
Console.WriteLine("Opening connection...");
Vendor.ws_ordersSoapClient VendorClient = new VendorInterface.Vendor.ws_ordersSoapClient();

[code]....

View 4 Replies

Conversion Error On Line 5 Stating 'Conversion From String 'S' To Type 'Double' Is Not Valid

Apr 8, 2009

a user will enter a number, n, which ranges from 1 to 30. they will also enter a "P" or an "S" (sum or product). depending on which was selected, it will calculate the sum or product of the numbers from 1 to n.i'm having a conversion error on line 5 stating "Conversion from string "S" to type 'Double' is not valid." [code]

View 2 Replies

Text -> Excel Conversion (with Extensive Formatting Required After Conversion)?

May 11, 2012

I'm creating a program in VB.net that does the following:At a high level I receive a file in email, put the attachment in a monitored folder, import the text file to excel, format the excel, and then email the excel file to a list of recipients.

Here is my plan:

Completed: Outlook VBA to monitor all incoming email for specific message. Once message is received drop attached .txt file in a specific network folder.

Completed: (VB.net) Monitor folder, when text file is added begin processing

Not Complete: (VB.net) Import text file to Excel

Not Complete: (VB.net) Format Excel Text file.(add in a row of data,format column headers with color/size, add some blank columns, add data validation to some of the blank columns that allow drop down selections)

Completed: (VB.net) Save file.

Completed: (VB.net) Send file to list of recipients.

Obviously the items above that are not complete are the bulk of the work, but I wanted to get some advice on what some of you think would be the best way to approach something like this. The import and formatting of the file are causing me some problems because I just can't decide what would be the most efficient way to do this.

The way stated above. Import to excel -> format Having a template excel that contains all of the formatting already done for me and attempting to transition the data to this document (no clue if/how I can do this). Is it even feasible? Have the template already created and then import the text file to a new excel file, then transition that data to the excel template?

Something I thought about, in terms of formatting the document, was to record a macro of me doing all of the formatting that I'm going to need and then attempt to convert that macro into my vb.net code, but I'm not sure if that will work. I will need to verify that the text file comes in the EXACT format every time correct?

View 5 Replies

Java Conversion To .net Conversion Errors

Aug 31, 2009

Here's 2 questions that I hope someone can help me on. This is in VB.net. I keep on getting this error 'java.io.bufferedInputstream.count is not accessible in this context because it is 'Protected Friend'. Does anyone know how to fix this error?

The other errors i get are "Overload resolution failed because no accessible 'Val' accepts this number of arguments". I have listed below the code that I have coverted from Java. Where is my mistake?'the underlined areas are where it is giving me errors.

[Code]...i

View 7 Replies

Add Pdf Password Using Itextsharp?

Nov 30, 2009

Is it possible to add a password protected pdf using itextsharp?

View 2 Replies

How To Resize A Pdf Using ITextSharp

Jul 8, 2009

I have a bunch of PDFs that I'm just trying to open, resize the page, and then save. I'm also hoping that the file sizes will shrink significantly doing so. I am using iTextSharp and the resizing works just fine, but the file size is nearly identical, ever so slightly larger in fact. Here's the function I have now:

[Code]...

View 1 Replies

PDF Stamps With ITextSharp

Mar 25, 2009

Is there a way to extract the value for APPEARANCE_NORMAL from each stamp in a PDF using iTextSharp? I know how to find all the Stamp annotations, but I am unsure how to get APPEARANCE_NORMAL.

View 6 Replies

.net - ITextSharp Overlay Image?

Mar 15, 2011

I have an instance where I have a logo image as part of some artwork..If a user uploads a new logo I have a form field which is larger than the default logo.I then use that form field to position the new image.

The problem is I need to set the background colour of that form field to white so that it covers the old logo in the event that the new image is smaller than the old logo..

what I have done is:foreach (var imageField in imageReplacements)
{
fields.SetFieldProperty(imageField.Key, "bgcolor", iTextSharp.text.Color.WHITE, null);
fields.RegenerateField(imageField.Key);
PdfContentByte overContent = stamper.GetOverContent(imageField.Value.PageNumber);
float[] logoArea = fields.GetFieldPositions(imageField.Key);

[Code]...

The problem with this is that the background colour of the field is set to white and the image then doesn't appear.. i remove the SetFieldProperty and RegenerateField commands and the image replacement works fine.is there a way to set a stacking order on layers?

View 1 Replies

.net - Itextsharp: Pdfptables Are Running Into Each Other?

Sep 3, 2009

why my tables are lapping over each other?

Dim datatable As PdfPTable = New PdfPTable(4)
Dim page As Rectangle = document.PageSize
datatable.TotalWidth = page.Width - document.LeftMargin - document.RightMargin

[code]....

even though im decrementing last_pos by the height of the previous table, they still lap over in a weird way like this:

View 1 Replies

.net - WidthPercentage Not A Member Of Itextsharp?

Aug 25, 2009

for this line: c.WidthPercentage = 100F

i am getting this error:Error 1'WidthPercentage' is not a member of 'iTextSharp.text.Table'.

here's the entire code. it's taken directly from the tutorial

Imports System
Imports System.Drawing
Imports System.IO
Imports iTextSharp.text
Imports iTextSharp.text.pdf

[Code]...

View 1 Replies

Convert Fdf Files To Pdf With ITextsharp In Vwd?

Mar 25, 2009

I need to convert fdf files to pdf in asp.net using vb. I found some code that I'm trying to learn from. What I would like to do is upload the fdf file and then output a pdf to a directory and email it out. The fdf files are coming from a shared linux/php host (using the php fdf functions is all I can do here on this host) that are emailed to a central inbox. I'm going to pick up the files from the inbox and upload them to a win/asp.net box to convert to pdf.The code i found is below.


* Dim pdfFlat As New MemoryStream() * Dim pdfReader As New PdfReader(context.Request.MapPath(pdfFormFileName)) * Dim pdfStamper As New PdfStamper(pdfReader, pdfFlat) * ' bind fields from fdf... * Dim fdfReader As New FdfReader(context.Request.InputStream) * Dim pdfForm As AcroFields = pdfStamper.AcroFields *

[code]...

View 1 Replies

Coumnwise PDF Print Using Itextsharp?

Jun 5, 2011

I want to display the data in the 2 column of PDF using iTextsharp. Like this way e.g.

Q.1 aaaaaa Q.5 eeeeeeeeeee
Q.2 bbbbbb Q.6 fffffffffff
Q.3 cccccc Q.7 ggggggggggg

[code]....

I can done it by using count but it's not working if the question length is min/max . how i can done it manually.

View 4 Replies

Create A Pdf From A Webpage Using ITextSharp?

Jan 9, 2009

Does anybody know how to create a pdf from a web page using iTextSharp? I've already added the reference to my program, but i'm not clear on how to create a pdf from a web page.

View 1 Replies

Does Anyone Have Experience With Tables In Itextsharp

Sep 2, 2009

I have created a simple table and i need to position. does anyone have experience with tables in itextsharp? [code] the first table works but the second does not

View 2 Replies

Find The Text Using Itextsharp?

Mar 7, 2009

How to find the text in pdf using itextsharp.

View 1 Replies

Getting Unhandled IOException When Using Itextsharp ?

Sep 15, 2009

I am getting this unhandled IOException when using itextsharp

Rebuild failed: Error reading string at file pointer 3; Original message: xref subsection not found at file pointer 118

The line of code throwing this error is: Dim inputDoc As New iTextSharp.text.pdf.PdfReader(inputPath)

View 11 Replies

How To Access To An Encrypted PDF With ITextsharp

Mar 2, 2012

I have an pdf file, encrypted with a certificate. I want to access to it in order to create a decrypted copy.I have the certificate stored at personal windows certificate store. Is it possible to use this one? How can I access with the pdfReader object?

View 1 Replies

How To Export GridView To PDF Using ITextSharp

Nov 18, 2011

I am trying to export gridview (HTML Based) to a pdf in asp.net+vb.net (backend). When I click on the Export to PDF button the download window shows, but when you click on open Adobe reader will open but displays the message

" Adobe Reader Could not open 'test[1].pdf' because it is either not a supported file type or because the file has been damaged ( for example, it was sent as an email attachment and wasn't correctly decoded) ".

The coding for export to pdf is same for 5 different reports of which 4 are working fine, as well as export to Excel is also working fine for all 5 reports. Does it have any relation with the itextsharp dll version? (I am using itextsharp version 3.1.1.0)

View 1 Replies

Itextsharp: Getting Coordinates Of Image?

Dec 15, 2009

in vb.net is it possible to get the coordinates of an image like if i do a

document.add (jpeg_image)
x_coordinate = jpeg_image.xcoordinate???????

View 1 Replies

Itextsharp: Getting Height Of Image

Dec 15, 2009

i need to add a data table right after an image on a PDF in vb.net

[Code]...

i highlighted broccoli, buckwheat, butter, cabbage. these are all part of a data table that is supposed to go after the bottom SEVERE word because the entire thing that you see is one image called jpg2

View 1 Replies

PDF Radio Button Using ITextSharp?

Feb 18, 2009

I am trying to set a radio button in a PDF form using iTextSharp(open to other ways too).

[Code].....

View 3 Replies

Read The Hyperlinks In PDF Using ItextSharp?

Jul 4, 2008

How can I read the hyperlinks in PDF using ItextSharp ??

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved