Results 1 to 7 of 7

Thread: itextsharp help required!

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    44

    itextsharp help required!

    Using itextsharp for PDF generation. Software is on about 700 PC's and it doesn't work for TWO of them. This is the stack trace on the two machines where it doesn't work:

    Code:
    Exception Source:      itextsharp
    
    Exception Type:        System.IO.IOException
    
    Exception Message:     Rebuild failed: Input string was not in a correct format.; Original message: Input string was not in a correct format.
    
    Exception Target Site: ReadPdf
    
     
    
    ---- Stack Trace ----
    
       iTextSharp.text.pdf.PdfReader.ReadPdf()
    
           xClaim.exe: N 00190
    
       iTextSharp.text.pdf.PdfReader..ctor(filename As String, ownerPassword As Byte[])
    
           xClaim.exe: N 00247
    Things I have tried - none work:

    • Uninstalling/Reinstalling Adobe 6 and 7 Professional (not just reader) (yes, one failure is occurring on a patched AA6, another on patched AA7)
    • Changing the path of the blank PDF they are opening and populating to a wide variety of places on the OS.
    • Added the blank PDF file as a resource to my solution and used the Byte overload ctor (no luck - same error message which surprised me greatly - just the different ctor shown)


    The file isn't corrupt, they can navigate to the exact same PDF that I'm trying to load with itextsharp and double click it just fine. At first I thought it might be an application trust issue, but it's deployed through ClickOnce so that shouldn't be it. Perhaps there is an option in Adobe somewhere that is prohibiting opening in this fashion? Why is it working on 698 PC's and not two? Any ideas would be helpful.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: itextsharp help required!

    I'm guessing it's something to do with this

    filename As String

    If the filename consists of the path here, and the path is the windows documents and folders path, then look at the usernames involved. Any unusual characters that don't belong in a name such as an apostrophe? Or any other strange characters?

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    44

    Re: itextsharp help required!

    Static path, same for all users. Doesn't work on TWO computers.

    Plus, I changed the ctor used and compiled the blank PDF into my app instead of locating it on the file system. Still same error, slightly different stack trace:

    Code:
    Exception Source:      itextsharp
    
    Exception Type:        System.IO.IOException
    
    Exception Message:     Rebuild failed: Input string was not in a correct format.; Original message: Input string was not in a correct format.
    
    Exception Target Site: ReadPdf
    
     
    
    ---- Stack Trace ----
    
       iTextSharp.text.pdf.PdfReader.ReadPdf()
    
           xClaim.exe: N 00190
    
       iTextSharp.text.pdf.PdfReader..ctor(pdfIn As Byte[], ownerPassword As Byte[])
    
           xClaim.exe: N 00253
    
       iTextSharp.text.pdf.PdfReader..ctor(pdfIn As Byte[])
    
           xClaim.exe: N 00007

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: itextsharp help required!

    if I had to trouble shoot this issue, I would be looking into what elements that iTextSharp may use that is DIFFERENT on the problem machines, versus the good ones. That would include framework versions, any patches/SP applies to the framework version this app is targetting. After I decided that was all good, I would let the people on this forum know, and ask for more suggestions

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    44

    Re: itextsharp help required!

    Target machines are 2000 miles away and I cannot reproduce problem here. At wits end, gonna have to deploy anyway.

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: itextsharp help required!

    2000 miles away doesn't mean a whole lot in the age of computers.

    What OS do they run? You should be able to remote into them and poke around...

    all depends on if this is consumer machines, corprorate environment, etc...

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    44

    Re: itextsharp help required!

    Corporate environment, permissions to do that strictly controlled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width