• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

PDFBox filling form exception

 
Greenhorn
Posts: 7
Android Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've write a simple code for edit content of a form inside a pdf. Everithing works fine (new pdf is created with modified form) but a strange excetpion about fonts were thrown. This is my code:



and this is the exception:

Grave: error while creating a font
java.io.IOException: Cannot create font as /SubType is not set.
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:88)
at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:203)
at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.getFontAndUpdateResources(PDAppearance.java:439)
at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.setAppearanceValue(PDAppearance.java:268)
at org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.setValue(PDVariableText.java:131)
at prove.Prove.main(Prove.java:37)



line 37 it's where i call setValue method
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites: cross-posted at http://stackoverflow.com/questions/19933931/pdfbox-exception-on-fonts
 
giuseppe gio
Greenhorn
Posts: 7
Android Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Please BeForthrightWhenCrossPostingToOtherSites: cross-posted at http://stackoverflow.com/questions/19933931/pdfbox-exception-on-fonts



i've crossposted for solve my problem as soon as possible
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic