Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. pdf text manipulation

pdf text manipulation

Scheduled Pinned Locked Moved C#
csharp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Naga Sudha
    wrote on last edited by
    #1

    Hi, Does itextSharp support editing an existing pdf file. We have a pdf template file with placeholders for different values that needs to be replaced with the actuals programmatically. Basically kind of "Find and Replace" text values.Is this possible by itextSharp from sourceforget.net or any other pdf writer/generators. TIA

    H J 2 Replies Last reply
    0
    • N Naga Sudha

      Hi, Does itextSharp support editing an existing pdf file. We have a pdf template file with placeholders for different values that needs to be replaced with the actuals programmatically. Basically kind of "Find and Replace" text values.Is this possible by itextSharp from sourceforget.net or any other pdf writer/generators. TIA

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      If you have questions specific to a particular product, then you need to ask on it's respective site. SourceForge has forums for each projects, so go to the iTextSharp project page and click on "Forums". If that doesn't do what you need it to, there is another article on this site I just read the other day that may: A PDF Forms Parser[^]. There may be others as well, but you just need to search. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]

      1 Reply Last reply
      0
      • N Naga Sudha

        Hi, Does itextSharp support editing an existing pdf file. We have a pdf template file with placeholders for different values that needs to be replaced with the actuals programmatically. Basically kind of "Find and Replace" text values.Is this possible by itextSharp from sourceforget.net or any other pdf writer/generators. TIA

        J Offline
        J Offline
        Jon G
        wrote on last edited by
        #3

        iTextSharp does not provide an option to EDIT an existing pdf file. Here is a quote from their tutorial:

        You can't 'parse' an existing PDF file using iText, you can only 'read' it page per page.
        What does this mean?
        The pdf format is just a canvas where text and graphics are placed without any structure information. As such there aren't any 'iText-objects' in a PDF file. In each page there will probably be a number of 'Strings', but you can't reconstruct a phrase or a paragraph using these strings. There are probably a number of lines drawn, but you can't retrieve a Table-object based on these lines. In short: parsing the content of a PDF-file is NOT POSSIBLE with iText. Post your question on the newsgroup news://comp.text.pdf and maybe you will get some answers from people that have built tools that can parse PDF and extract some of its contents, but don't expect tools that will perform a bullet-proof conversion to structured text.

        Also,

        What iText DOES provide is the possibility to READ a PDF document and copy an entire page of this file into the PDF file you are constructing from scratch. This can be useful if you want to create a new document based on (an) existing document(s). You can add a Watermark, pagenumbers,...

        You may want to check out http://itextsharp.sourceforge.net/tutorial/ch01.html[^] Jon G www.Gizmocoder.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups