Jump to content

Simple Imposition Question - I think


dbentley

Recommended Posts

I have a single page 8.5 x 11 PDF file with 112 pages. (All pages are to print 1 sided.)

 

There is no data file associated with this job. I need to impose this PDF file 2up on a press sheet, but only 1up of each of the single pages ganging with different pages to create 2 collated stacks. (56 total print sheets)

 

(In other words - I need to stack the pages 1-56 on the left side of the final print sheets - and pages 57-112 on the right side of the final print sheets.)

 

I've attached an example of how i would like the final print sheets to look. Each number corresponds to the actual page number within the single page PDF file I have to start with.

 

I've been successful with imposing this when a sequence data file has been used to compose with, but I cannot seem to get anything to work without the data option.

 

Any help would be greatly appreciated. Thanks!

 

Example.pdf

Link to comment
Share on other sites

Create a FusionPro template with input format None, a single blank 8.5x11" page, and a single graphic frame covering the page completely, and enter a variable name for the frame, such as "Resource Page". Then create an OnRecordStart rule with code like this:

var r = CreateResource("path and name of the PDF resource", "graphic");
FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
FusionPro.Composition.AddGraphicVariable("Resource Page", r);

Set up your imposition, and compose.

Link to comment
Share on other sites

I have a single page 8.5 x 11 PDF file with 112 pages. (All pages are to print 1 sided.)

 

How does a "single page PDF" file have 112 pages? Are you saying that you have a 112 page PDF file that you want FP to impose as if each page were a record? You can do that – you just have to make FP think that each page is a different record.

 

If you're wanting to turn the 112 page PDF into the template, you'll need an OnRecordStart rule that looks like this:

FusionPro.Composition.repeatRecordCount = 112;
var i = FusionPro.Composition.repeatRecordCount + 1;
while (--i)
   FusionPro.Composition.SetBodyPageUsage(i, i == FusionPro.Composition.repeatRecordNumber)

 

That is:

Setting the "record" to repeat 112 times (once per page in the template)

and for each repeat, it turns off every page with the exception of the current repeat number. So, for the first repeat it turns off pages 2–112, for the second repeat it turns off page 1 and pages 3–112, until it gets to page 112.

Link to comment
Share on other sites

Setting the "record" to repeat 112 times (once per page in the template)

and for each repeat, it turns off every page with the exception of the current repeat number. So, for the first repeat it turns off pages 2–112, for the second repeat it turns off page 1 and pages 3–112, until it gets to page 112.

I think that would work, but it would be a lot slower than using a one-page template as I suggested.

Link to comment
Share on other sites

Dan -

 

Thanks for the response. I'm giving yours a try - although we work on Mac's off of a secure server and trying to get a path to the actual graphic file is giving me more trouble than I planned. I thought I had the path correct, and the rule validates ok - but when I compose the final file - Fusion Pro shuts down.

 

Is there a way to use this rule as an uploaded graphic resource file instead?

Link to comment
Share on other sites

How does a "single page PDF" file have 112 pages? Are you saying that you have a 112 page PDF file that you want FP to impose as if each page were a record? You can do that – you just have to make FP think that each page is a different record.

 

Step-

Yes, that is what I meant regarding the "single page PDF file". We generally refer PDF files into either "single page" vs "imposed page" PDF formats - sorry for the confusion.

 

Thanks for the help. I'll try both Dan's suggestion and yours as well to see which option works best!

Link to comment
Share on other sites

Thanks for the response. I'm giving yours a try - although we work on Mac's off of a secure server and trying to get a path to the actual graphic file is giving me more trouble than I planned. I thought I had the path correct, and the rule validates ok - but when I compose the final file - Fusion Pro shuts down.

What do you mean by "shuts down?" Does it crash? If so, is there a crash report? Or is there an error code?

Is there a way to use this rule as an uploaded graphic resource file instead?

Sure, just add a named resource and call it out with the Resource function instead:

var r = Resource("your resource name here");
FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
FusionPro.Composition.AddGraphicVariable("Resource Page", r);

Link to comment
Share on other sites

  • 4 weeks later...

Apologies for the delay in getting back to you...

 

I was able to get Step's rule to work for what I needed to accomplish, but I am still unable to get Dan's to compose without FP crashing.

 

We now are needing to have versions of these run as 2 sided with a common back for each page - which i would think would be easier to accomplish using Dan's method, but I am still struggling accomplishing his one sided method.

 

I've attached the working files that I am using, Dan. Could you take a look? I've included the error (crash) messages that I receive when trying to compose.

 

The additional file included in the Support_Files folder named "dummy.pdf" is what I need to incorporate as the common back for our 2 sided pieces.

 

Let me know if you have any suggestions.

Thanks tons!!

Danielle

Test_Files.zip

1upImpoXX_220.fpi

Edited by dbentley
added impo file
Link to comment
Share on other sites

I think the reason your template is failing is because your code is creating a variable named "Resource Page" but you aren't assigning it to the graphic frame. You either need to type "Resource Page" in the graphic frame property window where it currently says "[Field of Rule]" or change Dan's code to this:

var r = Resource("Kafka on the Shore signature pages.pdf");
FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
[color="Red"]FindGraphicFrame("ResourcePage").SetGraphic(r);[/color]

 

We now are needing to have versions of these run as 2 sided with a common back for each page - which i would think would be easier to accomplish using Dan's method, but I am still struggling accomplishing his one sided method.

 

The additional file included in the Support_Files folder named "dummy.pdf" is what I need to incorporate as the common back for our 2 sided pieces.

 

You could duplicate the first page in your template creating a second page that you toggle on/off from OnRecordStart depending on when you want to duplex. Then you'd just change the variable on the second page's frame from "Resource Page" to "Back Page" and your code would look like this:

[color="red"]var duplex = true; // false for 1 sided[/color]

var r = Resource("Kafka on the Shore signature pages.pdf");
FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
FusionPro.Composition.AddGraphicVariable("Resource Page", r);


[color="red"]FusionPro.Composition.AddGraphicVariable("Back Page", Resource("dummy.pdf"));
FusionPro.Composition.SetBodyPageUsage(2, duplex);[/color]

 

Alternatively, your template could remain unchanged and you could repeat each page twice (once for the front and once for the back) pulling in the "dummy" resource for even repeats:

var r = Resource("Kafka on the Shore signature pages.pdf");
FusionPro.Composition.repeatRecordCount = r.countPages * 2;

var rep = FusionPro.Composition.repeatRecordNumber;

if (rep % 2) 
   r.pagenumber = Round(rep/2,0);
else
   r = Resource("dummy.pdf");

FusionPro.Composition.AddGraphicVariable("Resource Page", r);

Link to comment
Share on other sites

  • 1 year later...

I would like to chime in and make this a "not so simple imposition question". I've set up my template as described above with a single page and a GraphicBox on it and placed this coding in OnRecordStart

var imgPath = ".\\Variable Artwork\\"
var imgName = Trim(Field("fileName"));
var r = new FusionProResource(imgPath + imgName, "graphic", true);

FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
FindGraphicFrame("ResourcePage").SetGraphic(r);

I'm reading in a simple data file that just contains the name of the file that I want to impose so I don't have to keep hard-coding this each time. However I would like to be able to do more than one file at a time. If I have 5 different files that need to be imposed I want the output to be five different files imposed 2-up.

 

The above coding works when I simply compose each record at a time ... but ... when I try to encode all 5 records while using the "output to multiple files" feature and set it to "1" to process each record separately, the resulting output is all five pdf files concatenated together and THEN imposed into one large 2-up file according to THAT page count. I was expecting to get 5 files named "Output_1.pdf, ... , Output_5.pdf" with each one being imposed 2-up according to their individual page lengths.

 

I was wondering why the multiple file functionality doesn't work for this? I've used it before set to 1 on a number of business card templates to process individual card proof files for large lists of sales people. Is there another line of coding that is needed?

.

Link to comment
Share on other sites

What kind of imposition are you using? One that's stacked "indefinitely?" It would probably help to attach a collected sample of your job but my first inclination is that you might want to include this in your OnRecordStart rule:

var imgPath = ".\\Variable Artwork\\"
var imgName = Trim(Field("fileName"));
var r = new FusionProResource(imgPath + imgName, "graphic", true);

FusionPro.Composition.repeatRecordCount = r.countPages;
r.pagenumber = FusionPro.Composition.repeatRecordNumber;
FindGraphicFrame("ResourcePage").SetGraphic(r);
[color="Red"]if (FusionPro.Composition.repeatRecordNumber == 1)
 FusionPro.Composition.OpenNewOutputFile();[/color]

And this in your OnJobStart:

FusionPro.Composition.chunksBreakStacks = true;

Link to comment
Share on other sites

Thanks Step,

 

That worked ... just not quite as I expected. I originally left the output to multiple files checked when I tried your additional coding and I got 123 files each with one page imposed on the left side of the sheet. Then I turned off the multiple files option and FusionPro composed to what I want. Didn't quite dawn on me that the OpenNewOutputFile() command would work the same as and in place of the multiple file option during composition.

 

Again ... thank you.

.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...