Jump to content

JeremyT

Registered Users - Approved
  • Posts

    88
  • Joined

Everything posted by JeremyT

  1. I am trying to get FusionPro on the Mac to create a new folder to place output PDFs in. I've used a similar set up with FusionPro on a PC and FusionPro will create a new folder to output into. Here is what I have in OnRecordStart var BranchNumberFormatted = FormatNumber('000', Field("BR #")); FusionPro.Composition.outputFileFullPathName = "//Volumes/PCCustomers/A/Branch Files/" + BranchNumberFormatted + "/" + outputName; In the job I have a new branch #581. I would like FusionPro to create a folder named "581" in the "Branch Files" folder. Any suggestions? Thanks.
  2. I hadn't considered using the FP Imposer. I'm trying to simplify this job so using FP Imposer won't work. Ideally I'd like to do this all in one step within FusionPro.
  3. New year, additional job requirements. So this job is for making calendar imprints. Most branches have a single address, but some have multiple addresses. FusionPro looks at my data file and chooses which template page to use depending on how many addresses. Then outputs a pdf for that branch that is labelled and put in a folder. This part of the job is for proofing, it is a smaller page size that shows the imprint in the imprint area. I need to have another page that is the "imposed" part. It takes the smaller page size pdf created above and positions it on a larger page. I need to have this be its own pdf when completed. So I need to get 2 pdfs out of this job. 1. a smaller page size for proofing 2. a larger page size for printing. What do I need to add to get the imposed pdf? Code in OnRecord Start. addresses = []; // Global array of addresses var pg = 0; // Count of pages for (var i in FusionPro.Fields) { var key = Int(addressMap.FindRecord('BR #', Field(i))); if (/IB\d+/.test(i) && (key+1)) addresses[pg++] = key; } FusionPro.Composition.composeThisRecord = !!pg; FusionPro.Composition.SetBodyPageUsage(pg + "Address", true);Code in OnNewOutputFile var outputName = Field("Branchkey") + "-AB Imprint 2017." + FusionPro.Composition.outputFormatExtension; FusionPro.Composition.outputFileFullPathName = "//Volumes/Imprints/" + outputName; Print("Changing to output file: " + outputName);}
  4. It appears that I failed to look at the simplest fix-enlarge the text box. Enlarging the text box worked. Thanks for your help!
  5. I am trying to get Copyfit and prevent widows on a variable data text box that is a maximum of 2 lines. I have a rule written that prevents a single word from ending up on the second line of a text box. [font=Calibri,sans-serif][size=2][color=black]return TaggedTextFromRaw(Field("CU Name")).replace(/(.*)(\s)(.+)$/, "$1 $3"); [/color][/size][/font] I turn CopyFit on the text box to automatically reduce text to fit in the box on 2 lines. How do I get CopyFit to work while preventing the second line from having only 1 word?
  6. Dan, Format Category of the cell is "Custom". Type is "[$-10409]mm/dd/yyy" I've attached a screen shot. If I change the format in Excel to "Date", type "3/14/01", it shows up as 42424 in FusionPro for 02/24/16. Thanks.
  7. I added the code that Step suggested and got the date formatted correctly. Thanks!
  8. Except for choosing correct font for each field, I was able to get this table set up correctly using the following code: var sq = CreateResource('Yellow Square.pdf','graphic'); // Square graphic var r = [ [Field("0EmailHeading"), Field("0EmailBody")], [Field("0WeblinkHeading"), Field("0WeblinkBody")], [Field("0AllMailHeading"), Field("0AllMailBody")], [Field("0POSHeading"), Field("0POSBody")], [Field("0OnsiteOppHeading"), Field("0OnsiteOppBody")], [Field("0LDPAutoHeading"), Field("0LDPAutoBody")], [Field("0COMHeading"), Field("0COMBody")], [Field("0StateNatHeading"), Field("0StateNatBody")] ]; // Array to hold paragraphs // Filter out empty paragraphs and splice the first 4 r = r.filter(function(s){ return s[0] && s[1];}).splice(0,4); var table = new FPTable(); table.AddColumns(3500, 50400); // Set your column widths here for (var i in r) table.AddRow().SetContents(sq.content, r[i].join('<br>')) return table.MakeTags();Thanks again for the help! Last question-how do I get Headlines a different font?
  9. Sorry about that, I wasn't sure how much information was needed. I've added the fields to the array. I deleted the line r.push([Field('Headline' + i), Field('Body' + i)]); because it gave me "Error: In Field(), no field named Headline1". And the fields were added to the array earlier. Then I get the error "TypeError: r.join is not a function" from this row: table.AddRow().SetContents(sq.content, r[i].join('<br>')); If I adjust to table.AddRow().SetContents(sq.content, [r].join('<br>')); the rule will validate. Once I preview I only get the boxes in the first column, nothing is produced in 2nd column. Also, I get 4 boxes when I should only have 2. Do the headline fields have to be added to a separate array than the body fields? Or what are the next steps? Thanks, Jeremy
  10. Step, Thanks again for your help! I was unsure of the best direction to go with this part of the job. Looking at the data further, the headline and body fields have different names for each paragraph. So, Headline1 and Body 1, etc won't work. These are the field names for the first 3 paragraphs: 0EmailHeading, 0EmailBody, 0WebHeading, 0WebBody, 0POSHeading, 0POSBody. How do I get all those different fields into the array? Thanks, Jeremy
  11. I am working on a job where I need to have only the first 4 populated paragraphs be used. There is a maximum total of 8 paragraphs. Each paragraphs is comprised of Headline text and Body text. For instance if I have 5 populated paragraphs I want only paragraphs 1-4. If I have paragraphs 1, 2, 6, 7, 8 I want paragraphs 1, 2, 6, 7 but not 8. Of course, some times paragraphs only 1, 2, 6 are populated. How do I set this up? To make this more difficult each field will have a yellow box in front of the paragraph. Can the yellow boxes and text be adjusted together? Or do I need separate rules for boxes and text? I am attaching an image that shows what I am looking to do.
  12. Myriad Pro-It This is exactly what I needed! Thanks!
  13. Step, Thanks again for your help. I used the code you suggested and all works as needed on the Mac. I switch to a Windows 8 machine to compose so that the Helvetica font will embed. When I switch to Windows 8, I am having problems with Myriad Pro Italic font. I enter "MyriadPro-It" instead of "Helvetica" in the font measure function. It's not working correctly-column width is wider than longest line of text. In my very brief experience with measuring text width that means that I don't have the correct name in the code. I copied the font name from fonts.ini but that doesn't help either. How do I find the correct name for Myriad Pro Italic so that it composes correctly? Thanks, Jeremy Thanks, Jeremy
  14. This is exactly what I wanted to do! I used second set of code you posted. It's exactly what I needed! Thanks Step! Jeremy
  15. I am trying to adjust where the address is centered under a logo. The problem is that if either line of text is wider than the logo then I'd like to have the widest line start at the same x coordinate as the logo (left justified under logo). Then the shortest line would be centered under the widest line. I've attached a pdf of 3 examples. The top example shows what address block looks like centered under logo-all the text is narrower than logo. Middle example shows what I'd like to happen if the street address line is the longest. Bottom example shows what I'd like to happen if the city, state zip line is the longest. Is the best route to adjust this add a center tab and then adjust tab position based on text line width? Or, can I adjust the width of the text frame based on longest line of text? Thanks, Jeremy Jeremys Copy Shop.pdf
  16. I am working on a project where each record gets 17 output PDFs for production. The output PDFs are labeled by adding a name in the page usage dialog. This name is added to the individual PDF file name when output. I'd also like a PDF for each record with all 17 pages in it for proofing to the customer. Each record needs its own PDF proof. I am using OnNewOutputFile to output 17 pages in individual PDFs labeled with page name. I select each page to be unused in BodyPageUsage and then have OnNewOutputFile rule turn each page on when creating individual pdfs. "Ouput to Multiple files" is checking when composing. How do I additionally get 1 file with 17 pages still labeled individually for each record? Thanks, Jeremy
  17. I've worked with rules like the posts you suggested show. I am unfamiliar how those rules would work with an array.
  18. Merge works correctly now that I've got the code in the right spots. I adjusted the code for returning the addresses. I added a comma after City. I also added phone and fax numbers. key = addresses.shift(); var address = ExternalField("Address"); var CityComma =[ExternalField("City"),","].filter(String).join(''); var CSZ = [CityComma,ExternalField("St"),ExternalField("Zip")].filter(String).join(' '); var phone = ExternalField("Phone"); var fax = ["Fax:",ExternalField("Fax")].filter(String).join(' '); address = [address,CSZ,phone,fax].filter(String).join('<br>'); return address || ''; //================================================== // Short hand for returning the external data values //================================================== function ExternalField(name) { return addressMap.GetFieldValue(key,name); }Two minor adjustments: 1. I had a couple of instances where the address was missing, so nothing was returned and the incorrect BodyPage was used. Can a line be added to the composition log saying that it was not able to find an address for a specific branch? 2. Now that I've added phone and fax numbers, how do I suppress "Fax: " if a branch doesn't have a fax number? Thanks again for all your help!!
  19. Progress! I added a comma between City and State. I added Phone number. I added "Fax: " and the fax number. I put the "address" array into an OnRecordStart callback rule. It now pulls address and puts them into an array. Addresses are called from an array, but the SetBodyPageUsage isn't working correctly. I attached 341 Imprint 2015.pdf which has 12 address imprints. It puts Address 1 into text frame on 1Address page, then Address 2 and Address 3 go into text frames on 2Address page, then Address 4, Address 5, Address 6 go into text frames on 3Address page. Merge should put all 12 addresses on 12Address page. Thanks again! Imprints 2015.pdf 341 Imprint 2015.pdf
  20. Step, Thank you for your help. I am still having trouble getting this to work. I followed your instructions and now I get 10 blank pages for each record when I compose. You are correct, IB## fields are the address fields. So, IB1 would be address Imprint 1, IB2 would be address Imprint 2, etc. Here is what I did: I put the following code into JavaScript Globals addresses = []; // Global array of addresses var pg = 0; // Count of pages for (var i in FusionPro.Fields) { if (/IB\d+/.test(i) && Field(i)) addresses[pg++] = Field(i); } FusionPro.Composition.composeThisRecord = !!pg; FusionPro.Composition.SetBodyPageUsage(pg + 'Address', true); In OnJobStart I put addressMap = new ExternalDataFileEx('2014 er 2015 October Branch Master List - Calendars.txt','\t');In the Return Address Phone Numbers from Branch Master List Rule I put var [key] = addresses || ''; // If no branch found, return nothing if (!key) return '' // Remove leading zeros from Branchkey key = String(Int(key)); var address = ExternalField("Address"); var CSZ = [ExternalField("City"),ExternalField("St"),ExternalField("Zip")].filter(String).join(' '); address = [address,CSZ].filter(String).join('<br>'); // Remove the current address from the array addresses.splice(0,1); return address; //==================================== // Short hand for returning the external data values //==================================== function ExternalField(name) { return addressMap.GetFieldValue(addressMap.FindRecord('BR #', key),name); } I am attaching the newest PDF I am composing from. Thanks! Imprints 2015.pdf
  21. I am working on a whopper of a merge job. I am setting up a job for imprinting calendars. I am given a list of branches and it tells me how many addresses will be on the imprint. Most of the branches have just one address so I am able to pull the address using an external data file. I have a total of 10 different body pages, depending on how many addresses will be on the imprint. Merge needs to first select correct body page, based on number of addresses required. Then each address gets it's own variable text box. For example, my data file says that branch 080 has 3 addresses- 80, 102, 324. FusionPro first needs to grab body page "3 Address". Then get address for branch 80 from external data file. Then put branch 80 address in variable data box 1. Then get address for 102 and put in variable data box 2. Then get address for 324 and put in variable data box 324. After that, it needs to output a separate PDF for branch 80, labelled as such. Then continue on to next branch, which most likely will have a different number of addresses and need a different body page. - How do I get FusionPro to select the correct body page? - How do I get FusionPro to fill each variable data box with the correct address? I've got the output rules set up from last year, so I don't need help with that. Thanks, Jeremy Calendar Imprint T.zip
  22. I recently upgraded Fusion Pro VDP to version 9.3.15. One of the new features is being able to use native Excel Spreadsheet files as a data source. This saves a step since I don't have to save it to a delimited CSV or TXT file. I've run into an issue with formatting a date from a native Excel file. Previously the date from tab delimited TXT file came into FusionPro as "07/26/2015". Now from native Excel Spreadsheet it comes in as "42218" for date 8/2/2015, "42211" for 07/26/2015, "42197" for 07/12/15, "42183" for 06/28/15. Date field has "Date" formatting applied in Excel. I format the Date field with this rule. var DateShort = FormatDate(Field("Date"), "m-dd-yy")Is there an adjustment to this rule so that I can use the Excel Spreadsheet and return date as "m-dd-yy"?
  23. This job ends up with 2 different version, 1 for print at full resolution and 1 for web at low resolution. Customer's customer sees both version so they need to match. Each record has 3 record-specific images that need to stay at 96 dpi and then 3 record-specific images at 72 dpi. So I would need to make Photoshop down-sample 3 images and then rename as low resolution. Then rules would have to be adjusted to use the low resolution version. David, your solution will save a bunch of time. The down-sampling is done before composition instead of after. My concern is making sure both versions match. I'll have to do some testing. I'm still wondering if there is a way to accomplish 3 variable graphics at 96 dpi and 3 at 72 dpi using Javascript or adjusting settings in FusionPro starting with full resolution graphics.
  24. I am working on a project where the customer wants the output pdfs saved low resolution for web use. Each record gets its own output pdf, so there is almost 4000 pdfs at end. Adjusting composition settings only affect what FusionPro composes, so I had to optimize the static background pdf to get images to 72 dpi. The problem is that customer is requesting that 3 of the images stay at a higher resolution- 96 dpi, the other 3 need to be downsampled for web use. I composed the job at full resolution and then optimized pdf to get images above 100 dpi down to 72 dpi, so that quality of 96 dpi images is preserved. Unfortunately, composing at full resolution and then optimizing took over 15 hours. Is there a way to get pdfs composed where resolution is downsampled for only 3 of 6 images? Thanks, Jeremy
×
×
  • Create New...