• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

missing line space in Text field while merging multiple PDF's using PDFCopy of IText

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using IText to fill the values in Designer created PDF using IText AcroFields along with this I am using PDFCopy of Itext to merge the same pdf file for 3 times with different data. The issue is I am having text field in the pdf where it will accept multiple lines and I had given 8 inches as the line spacing between the lines. When i create a single pdf( i.e. filling values in the form and creating a new file) the line spacing is the same as what I had given but when I try to merge the three files the line spacing in the Text Field is getting increased and my data is over flowing. I am merging the files using PDFCopy.

My code will looks like the following




Could any one please tell me what is the reason for increasing line space between the lines in Text fields


Thanks
Shiv
SingleFile.JPG
[Thumbnail for SingleFile.JPG]
line spacing while creating a single file
merging_Files.JPG
[Thumbnail for merging_Files.JPG]
line spacing while merging the file
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shiva and welcome to Javaranch!

Is the PDFCopy a separate tool?
 
shiva nanda
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martijn,

PDFCopy is not a tool. It is a class in IText API. I debugged the issue and found the reason for line space. It is because of turning on PDFStamper and not the PDFCopy. FormFlattening to true. When i turn of the formFlattening the line spacing is appeairing. But not able to find the solution

Thanks,
Shiva
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shiva,

Hmmm, sounds like a tricky internal API issue, have you tried on the iText/JasperReports forums?
 
shiva nanda
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martijn,

Yes. But no solution found . Anyways thanks for having a look into my post. Please let me know if you found any solution/clue.

Thanks,
Shiva
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic