pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilad Denneboom <gilad.denneb...@gmail.com>
Subject Re: Resize existing image
Date Wed, 11 Jan 2017 09:18:58 GMT
Thanks, I'll give it a try!

On Wed, Jan 11, 2017 at 12:03 AM, Tilman Hausherr <THausherr@t-online.de>
wrote:

> Am 10.01.2017 um 23:37 schrieb Gilad Denneboom:
>
>> Hi all,
>>
>> I'm trying to manipulate an existing image in my PDF file (double it in
>> size, for example), but I'm coming up short-handed... Any tips on how to
>> approach this using PDFBox? Is it at all possible?
>>
>> Thanks in advance!
>>
>>
> The easiest way would be to edit the PDF. Run WriteDecodedDoc to get an
> uncompressed PDF, find where the image is invoked, then change the "cm"
> parameters just before the image is invoked. Usually the cm command is like
> this:
>
> width 0 0 height xpos ypos cm
>
> (You can also view it with PDFDebugger, but you can't change it)
>
>
> if you edit the PDF make sure that the offsets stay identical. (position
> of "endstream")
>
>
> When done, open the PDF with Adobe Reader and save it. It will be
> compressed again.
>
>
> Tilman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message