Search code examples
javapdfpdf-generationapache-fop

Can Apache FOP be used to produce PDFs that can keep PDF-Clients from scaling and changing orientation?


i am using apache fop 1.0 to create some pdfs for customers for one of our clients. the printout of the pdf is read by a scanner later. Unfortunately the scanner cannot handle scaled printouts, so the question has come up if it might be possible to prevent scaling of a pdf in the pdf-client so that a printout would have to be done in the predefined size. I am aware of the possiblity of pdf-encryption which could be used to prevent printing at all, but what i need is somewhat different. So my questions are:

  • is there a way to force the pdf-client to print a pdf in the defined size without scaling ?
  • can the paper orientation be forced, too ?
  • is this possible at all, can it be done with apache fop ?

Actually i do not think that it is possible, but any help would be greatly appreciated.

best regards

Tyler


Solution

  • You can not really control the way a viewing application prints or displays a PDF. The best you can do is to attach a ViewerPreferences dictionary (section 12.2 of ISO 32000:2008) - but that's only a hint for the viewer.