• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Setting the zoom size of a PDF

Guest
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

Hi,
I'm using cfheader and cfcontent to open a PDF file for users to view.

<cfheader name="Content-Disposition" value="inline; filename=filename">
<cfcontent type="application/pdf" file="filename" deletefile="No">

I'm just wondering is there any way to set the zoom percent of the document when it opens in Acrobat?
Thanks,

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 16, 2007 May 16, 2007

Copy link to clipboard

Copied

Where is your PDF coming from? Do you need to dynamcially change the zoom level? I think acrobat defaults to whatever zoom level you last saved the document in. If you do need to dynamically change that level you might be able to do something like that leveraging the Java iText library (which you should already have installed if you are running CFMX - I think its what CF uses for <cfdocument>).

Of course, I've never actually used iText (just read about it) so take that advice with a grain of skepticism.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 16, 2007 May 16, 2007

Copy link to clipboard

Copied

Hi Spatz,

You can go for the <cfdocument> tag which has the 'scale' attribute for zooming the pdf..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007

Copy link to clipboard

Copied

Daverms wrote:
> You can go for the <cfdocument> tag which has the 'scale' attribute for zooming the pdf..

actually that "zooms" the content *before* it gets stuffed into the PDF.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007

Copy link to clipboard

Copied

spatz04 wrote:
> I'm just wondering is there any way to set the zoom percent of the document
> when it opens in Acrobat?

i know you can add stuff to the url & the reader will interpret it:

http://bangkok/testCF/iText/registered.pdf#zoom=25?page=5

will cause the acrobat reader to open the registered.pdf at page 5 & a zoom
factor of 25%. not exactly sure how you'd do it via cfheader/cfcontent. maybe
add it to the filename parameter?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation