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

how to force CFPDF merge to resize all docs to the same dimensions

New Here ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

We are trying to use CFPDF merge and having issues having all the merged documents come out the same width.  currently some are slightly larger than others but enough to make it annoying.  have verified the orientation of all docs are the same, and have already attempted to use the getinfo action to determine document widths, but apparently CF is "optimizing" these at runtime to what it "thinks" it should be thus throwing off the proportions to use in hscale & vscale attributes.    Anyone have this issue and found a solution?

Views

430

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 ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

I've never used the CFPDF tag, never had a need for it.  However, a thought.

Would it be feasible to use the CFPDF tag on each individual PDF document and size them before merging them?  Set a width/height and process each individually, then combine.

Just my two cents.

V/r,

^ _ ^

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
New Here ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

cfdocument has the ability to do that, but unfortunately (to my knowledge) cfdocument won't work on existing PDFs.  CFPDF transform has the vscale & hscale attributes which would work fine if merge kept the original doc sizes intact.  even when using just 99%, it shrinks the page way smaller than needed

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 ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

So you couldn't use a CFLOOP for all the separate PDFs to resize them, then after the loop use CFPDF to merge?

V/r

^ _ ^

UPDATE:  For example, say all the PDFs exist in one directory.

<cfdirectory directory="D:/path/to/webroot/PDFs/" filter="*.pdf" action="list" name="allPDFs" /><!--- this gives you a query object --->

<cfoutput query="allPDFs">

<cfpdf {place all attributes for resizing here} />

</cfoutput>

<cfpdf {place all merge attributes here} />

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
New Here ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

in this instance, no.  part of the problem is some of these documents are coming from 3rd party sources and aren't of consistent widths

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 ,
Jan 11, 2019 Jan 11, 2019

Copy link to clipboard

Copied

LATEST

Unfortunately, the base is being evacuated of all non essential personnel (snowpocalypse), so I can't stick around to assist any further.

I'll try to get back from home, but can't guarantee it.  Best of luck.

V/r,

^ _ ^

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