This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

how to avoid image scaling with apache fop

 
Ranch Hand
Posts: 32
MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm currently making use of FOP to generate the PDF documents. I'm facing an issue while placing the image file. The problem is that I want to keep the image as it is with the image original dimensions. So I'm not giving any properties to fo:external-graphic tag. But the image is shrinking. The version of fop I'm using is 0.94version.

What needs to be done to avoid this shrinking?

I tried by setting
option 0: tryied with scaling="non-uniform", with some dimensions but image is not rendered in the proper shape as required.
option 1: content-width="auto", content-height="auto", scaling="uniform", width="100%", height="100%"
option 2: content-width="scale-to-fit", content-height="scale-to-fit", scaling="uniform", width="100%", height="100%"


I'm able to see the image in the PDF document but it is shrinked the width and height of the image and placed in the pdf document. I want to avoid this shrinking and keep the image in the pdf as it is with it's original image dimensions.

Please provide me the solution for this.

Please do not worry about typos.

Thank you very much for the help!!
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!