• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Cannot overwrite object on PDF using PDFBOX

 
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a bates number at the bottom of a PDF that is in the footer area.

I am using Apache PDFBOX that uses a white image to overwrite the header and footer and this works fine.

The bates number, however, I cannot remove. This number appears to be a clickable object that is perhaps in another plane in the z-direction?  

This is a complex PDF created using ITEXT originally, it appears, not that that's too important.

I'm wondering what's going on since even if I place the bates number right on top of the footer (again suggesting there's a depth issue or other object I am not aware of how to handle), the bates number is still there even after the code writes over the footer with the white png image.

Suggestions?

 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you analyzed the document structure with a PDF editing tool? Aside from Adobe, there are several open-source tools that will break down a PDF into its elements, including OpenOffice, Okular and PDFEdit. Or you could use the pdf2ps utility, although digging through the raw PostScript would probably be more tedious.
 
Mike London
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Have you analyzed the document structure with a PDF editing tool? Aside from Adobe, there are several open-source tools that will break down a PDF into its elements, including OpenOffice, Okular and PDFEdit. Or you could use the pdf2ps utility, although digging through the raw PostScript would probably be more tedious.



That's a good tip about LibreOffice.. I didn't know it could edit PDFs.

In any case, clicking on the bates number at the bottom just highlights the box around it. I still don't see any obvious way to remove it.

I've attached a sample of what I see in the footer area of the PDF. The "RE-15" is easily removable, but the bates number (in red), isn't so far...

Thanks,
 
Saloon Keeper
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't suppose you can share an edited version of that document for us to take a look?
 
Tim Holloway
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a quick check before I posted because while I knew that OO could edit PDFs, I wasn't sure that it could outline their structure. It can as it happens. You want to know that because if the element in question has been overlaid on a base document, its element path will be different and the first step to changing an element is in knowing where it is.

Once you know its true location try manually changing it in your PDF editor. If that fails, then there's probably some sort of protection attribute attached to it that you'll need to inspect and alter.
 
Tim Holloway
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that if the document is digitally signed, any change to its contents will void the signature.
 
Mike London
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for any confusion. This PDF was related to a court filing, but it's public (and a regular PDF) so I don't think there is any need for concern. My comment above was just checking with the client first.

Thanks

- mike
 
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic