Ok, that makes sense. Which part are you having a problem with?

— John

> On 12 Aug 2015, at 07:31, Kirk, Kenneth <kk...@ilsos.net> wrote:
> 
> I'm doing both.  I provide a service that takes tiff files from one of the 
> various processes we use to generate official documents and converts them to 
> PDFs so they can be stored in a document management system.  Then for 
> archival purposes I have to take selected documents from the document 
> management system and convert them back to tiff so they will run through the 
> software/hardware that converts them to microfilm for a disaster recovery 
> policy requirement.
> 
> -----Original Message-----
> From: John Hewson [mailto:j...@jahewson.com] 
> Sent: Tuesday, August 11, 2015 9:11 PM
> To: users@pdfbox.apache.org
> Subject: Re: Rendering PDImageXObject
> 
> 
>> On 11 Aug 2015, at 08:19, Kirk, Kenneth <kk...@ilsos.net> wrote:
>> 
>> John
>> 
>> How would I know what DPI the image was drawn with?  Some of the PDF pages 
>> come from source outside of my control but I have to extract them just the 
>> same.
> 
> I’m confused, you said you were converting TIFFs to PDF but now you mention 
> PDF pages from external sources? Are you reading the PDFs or writing them? 
> Did you mean that the TFF images come from an external source?
> 
> — John
> 
>> -----Original Message-----
>> From: John Hewson [mailto:j...@jahewson.com] 
>> Sent: Monday, August 10, 2015 1:38 PM
>> To: users@pdfbox.apache.org
>> Subject: Re: Rendering PDImageXObject
>> 
>> 
>>> On 10 Aug 2015, at 05:58, Kirk, Kenneth <kk...@ilsos.net> wrote:
>>> 
>>> I have a situation that maybe someone has already solved in a more 
>>> efficient manner.  When converting a tiff image to PDF I use the drawImage 
>>> method of the PDPageContentStream.  The tiff image has a resolution of 200 
>>> DPI which is 1700x2200.  When PDFRenderer renders this image from the 
>>> resulting PDF page  it does so at the PDF default of 72 DPI which logically 
>>> translates to page 23 inches by 30 inches when applied to the original 
>>> iamge size of 1700x2200.  Since I don't know after the fact what DPI a 
>>> image object on PDF page was drawn at I came up with down scaling the image 
>>> at PDF creation time to 72 DPI.  I'm sure there must a better way one of 
>>> you computer science PHDs have come up with.
>>> 
>> 
>> You can draw the image with a scale of 72 / 200, in other words:
>> 
>> double dpi = 200; // you’ll want to fetch this from the tiff 
>> content.drawImage(image, x, y, image.getWidth() * 72 / dpi, 
>> image.getHeight() * 72 / dpi;
>> 
>> — John
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
>> For additional commands, e-mail: users-h...@pdfbox.apache.org
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ************************************************
>> Disclaimer - This email and any files transmitted with it are confidential 
>> and contain privileged or copyright information. You must not present this 
>> message to another party without gaining permission from the sender. If you 
>> are not the intended recipient you must not copy, distribute or use this 
>> email or the information contained in it for any purpose other than to 
>> notify the Office of the Illinois Secretary of State. 
>> 
>> If you have received this message in error, please notify the sender 
>> immediately, and delete this email from your system. Any views expressed in 
>> this message are those of the individual sender, except where the sender 
>> specifically states them to be the views of the Office of the Illinois 
>> Secretary of State. 
>> ************************************************
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
>> For additional commands, e-mail: users-h...@pdfbox.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ************************************************
> Disclaimer - This email and any files transmitted with it are confidential 
> and contain privileged or copyright information. You must not present this 
> message to another party without gaining permission from the sender. If you 
> are not the intended recipient you must not copy, distribute or use this 
> email or the information contained in it for any purpose other than to notify 
> the Office of the Illinois Secretary of State. 
> 
> If you have received this message in error, please notify the sender 
> immediately, and delete this email from your system. Any views expressed in 
> this message are those of the individual sender, except where the sender 
> specifically states them to be the views of the Office of the Illinois 
> Secretary of State. 
> ************************************************
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
> 

Reply via email to