Jump to content

ReminderVDP

Registered Users - Approved
  • Posts

    139
  • Joined

Everything posted by ReminderVDP

  1. Thanks Dan. I did get it to work with the code ThomasLewis put in here. That was a huge help.
  2. That's what I thought you meant. I will try that. Thanks!
  3. Thomas, Would that go in place of the 00 in the code below? + 'GH_magazine-00'
  4. I've got a rule in a file that looks for a PDF on a server in a folder based on the file name. It's looking for the file based on a field in my data but I'm adding two zeros in the rule because the data field does not contain the zeros. For example, the data field has "9" in it. The file it is looking for has "009" in it. My current rule is this: var issueNumber = 'GH00' + Field("MagIDShort"); var pathName = "X:\\EDITORIAL\\FinalGutsforProofs\\GHM\\"; var FullResourcePath = pathName + issueNumber + "\\" + 'GH_magazine-00' + Field("MagIDShort") + ".pdf"; //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; var pages = (x.countPages); for (var pgnbr = 1; pgnbr <= pages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString; It adds the two zeros in line 4. However, we are coming up on issue 10 so I will only need to add one zero to the rule, but I still have people making files looking for issue 9 and still need the two zeros in the file name. Is there some reg ex that would look for one or two zeros? I'm not good at reg ex so I'm looking for a solution that can be used for either file name, 009 or 010. Thanks in advance.
  5. I am generating QR codes for the front and back pieces of artwork using the Graphic Rule QR Barcode. I created the rule and added the box to the artwork pages. It is appearing on a record where the field that is generating the QR code is blank in the data. Why is the QR code still generating when there is no data in the field? The code from the Rule is below. // Rule converted from XML Template "QR Barcode: qrShortUrl": // Choose the following values: // Begin XML Template selections // var RuleOrFieldToEncode = "qrShortUrl"; // "Data field or rule to encode" (Required): FieldOrRuleList var EncodingMode = "Byte"; // "Encoding mode" (Required): PickList ["Byte" (All characters), "AlphaNumeric" (Alphanumeric only), "Numeric" (Numeric only)] var ErrorCorrectionMode = "Q"; // "Error correction" (Required): PickList ["L" (Low), "M" (Medium), "Q" (Quality), "H" (High)] var PreferredFormat = "0"; // "Format (symbol size)" (Required): PickList ["0" (0 (automatic)), "1" (1 (21x21)), "2" (2 (25x25)), "3" (3 (29x29)), "4" (4 (33x33)), "10" (10 (57x57)), "40" (40 (177x177))] var ProcessTilde = false; // "Process tilde (~) escapes": CheckBox var foreColor = "Black"; // "Barcode color (optional; defaults to Black):": ColorList // End XML Template selections // var DataToEncode = RuleOrField(RuleOrFieldToEncode); return MakeQRBarcodeGraphic(DataToEncode, ProcessTilde, EncodingMode, ErrorCorrectionMode, PreferredFormat, foreColor);
  6. Thanks Dan. I did create a second layout with the first page, an overflow page and then the last page that has the mailing panel. I think I was having some issues reaching the file path on the server too. I'll try this rule and see if that does the trick.
  7. I'm sure this is incredibly simple but I cannot get any rules to work for it on the body pages for some reason. We have a 24 page magazine I will impose into printer spreads in the end with Imposer. The data could have a couple different customers in it mailing to a different 24 page PDF in one data field called "ARTF". I set up my layout as 24 body pages. I need the rule to put page 1 of the PDF in the data on Body Page 1, page 2 of the PDF on Body Page 2 and so on. Body Page 24 has the mailing panel and indicia. Any help is appreciated
  8. Thanks Jon. Once again, I over complicate my rules. That seems to work but it's moving the frame for every image not just one's that contain IC in the file name. I think this will work if I can just narrow the file name issue down in the rule.
  9. Two questions. Is there a way to move image frames based on a data field condition? I've found a few things to try and move them based on x and y coordinates but they just send the image up to the upper left corner instead of the coordinates I specified. Below is my current OnRecordStart rule. I'm trying to move the image frame up about 3/8" based off the file type. Do I just have the syntax wrong even though the rule validates? var myFrame = FindGraphicFrame("FC-AgentPhoto"); if (Field("AgentCoverPic").indexOf("IC")); return ResizeFrame("FC-AgentPhoto", myFrame.x = 29.304, myFrame.y = 501.048);
  10. This is something I have noticed with FusionPro since I've started using it. When inserting Template pages onto a Body page using a rule, the frames on the body page have to be larger than the actual template page size for it to work. For example, I'm trying to place a template page that has a background image onto the body page and the template page is 6x3.75 inches. That is also the size of the background art. The box I have to use to make it fit on the body page has to be at least 4 inches tall and 6 inches wide. It sticks off the body page in the layout because it only wants to align to the bottom of the frame on the body page. No matter what I change the alignment to for the text box, it always stays aligned to the bottom of the frame. This has really never been an issue until now. I'm trying to impose the layouts 2 up on a 23x29.50 inch sheet and the boxes that stick off the body page do not show up on the imposed 2 UP sheet. It's like they were just clipped off the layout when the imposition ran. It would be great if there was an explanation or fix for this because I can't figure out why I need to make the frame on the body page I am inserting a template page into so much larger than the template page size to make it work.
  11. That was my thinking. It finds the page size of the first page and holds that all the way through. I've never tried to insert different sized pages before.
  12. I am trying to insert a PDF between two body pages and the PDF has two different page sizes in it. It's 10 pages long and the first and last page are single pages at 8.375X10.125 inches and the other pages are spreads at 16.75x10.125 inches. When I preview the first spread page in the layout, the spread is crammed into the size of the first page (see attached screen shot). Is it not possible to have different page sizes in a PDF you are inserting? It looks like it uses the size of the first page for the rest of the page insertion. When I remove the single pages, 1 and 10, the spreads display fine. Is there any way around this?
  13. I think that rule I was working in got corrupted somehow. I put your code in a new Rule and it works. No matter what I changed the page number to in the rule I was using, it showed page 23. Seems to be working with the new rule now. Thanks for your help.
  14. Dan, That would be a second rule for the second half of the text. When I validate it, it only gives me page 23 as a result. It doesn`t include the rest of the pages after page 23.
  15. Dan, This worked. I'm taking it one step further and want to figure out a way to split the number of pages in half, no matter how many there are in the text PDF. Above, I knew I had a text document 44 pages and I told it to use the first 22. What can I put in the pages variable if I don't know the total amount of text pages? This is what I have right now and it finds the middle page of the text PDF, 22, but I can't get it to add the rest of the pages after page 22. It will only add that page. I would need it to start on page 23 of the text which I could add a +1 in the pages line. I think it's the page number variable causing the problem in this code though. var pathName = "/Users/macpro1/Desktop/InkJet Layout_2-21-20/"; var FullResourcePath = 'magazine-' + Field("MagIDShort") + ".pdf"; //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; var pages = Math.min(x.countPages/2) for (var pgnbr = pages; pgnbr <= pages; pgnbr++); { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString;
  16. Thanks Dan. I did not create 22 pages for text. I have one body page and an overflow page. Currently, the text is 44 pages and flows between cover pages in the output PDF. We are trying to add a center spread area with advertisements for the customer so the layout would be: Front Cover Text: pages 1-22 Center Spread of ads Text: pages 23-44 Back cover I'll give this a try and see if it works.
  17. Dan, I am using this rule and need to make a variation on it where the first 22 pages go into the text body page and the rest of the text (22 pages) goes into the overflow text body page. I have a center spread between the pages that will have advertisements in it so the text PDF file needs to be split in half. I tried doing a page count of 22 pages but I get the validation error of: line 9: SyntaxError: missing : after proerty id I don't thing the var pages is correct and is causing the SyntaxError. Rule: var pathName = "/Users/macpro1/Desktop/InkJet Layout_2-21-20/"; var FullResourcePath = 'magazine-' + Field("MagIDShort") + ".pdf"; //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; for (var pages = Math.min(x.countPages, 22); { x.pagenumber = pages; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString; Like usual, I'm probably over-complicating it.
  18. Dan, Thanks for the couple tips there. I won't be able to make the text file a resource because the names of the banks and companies would be specific to certain customers and all the disclaimers will be different. The name of the text file gets called out in the data and FusionPro grabs it from the server location where it is used in the layout. The </f> on the font tag worked in the data fields, that's why I used it here. If I don't need it though, I'll remove it. I think I could just use the bold tag though since those couple lines will be bold and the rest Minion Pro Regular. I think I made it more complex than it needed to be.
  19. I'm trying to format a disclaimer for a customer we work with who needs bold text on some lines of the disclaimer. I have been able to get tagged data files to work with different fonts, but not a separate text file the data calls for. I'm attaching my separate text file that would go into the layout. I feel like it's mostly tagged correctly but it previews as Arial and none of the bold lines work. ABC_disclaimer.txt
  20. I've been using this rule to insert magazine text pages inside a composition of a book cover. So the front cover is Body Page 1, Inside front cover is Body Page 2, the PDF I want to insert is next and then the Back Inside Cover and Back cover are the other Body Pages. Easy enough. The PDF files I want to insert are on a new server and for some reason, it is not finding the PDF I want to insert. The only thing I changed from the last template was the pathName field because the files are in a different location. I've double checked the names in the path and the file name and everything is correct. I'm stumped. Can someone see if they see anything that would not allow me to find the PDF in this rule when I validate it? Only thing I could think of is the server permissions. This is the Error message: ***Error*** (uncaught exception: Error: Graphic not found: magazine-97.pdf) var pathName = "//ServerLocation/Resources/"; var FullResourcePath = 'magazine-' + Field("MagIDShort") + ".pdf"; //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString;
  21. I am trying to edit an if/else rule and I want to find the best way to increment or search for a file name based off of another data field. Example below. We have a cover image for a magazine called SH_M097_COVER5_001.pdf. The actual number of the issue is 6. It's a long story. I'm trying to find a way to say this below: if (Field("CoverTemplate") =="FC-NP001"; return SH_M097_COVER5_001.pdf But this would have the issue number plus 91, so the 097 would be the only part of that file name that changes in the logic. I'm sure there is a regex or a way to increment that number, I'm just not sure how to tackle it. I'm trying to solve a problem by using a file name that exists.
  22. Kim, If you are using the Server API, you can do this pretty easily. I have done something similar to this in the past. I created one PDF for printing and one for a customer proof. Both PDF's were created from the same data file. You could do this with one template but it may be easier with two. One would be set up for just the fronts of the cards and the second template would be both the fronts and backs of the cards. Create a hot folder on the server and make two conditions for the hot folder. One would output from the front template file to a PDF and the other condition would output to a full imposed PDF. There is a check box in the condition that tells it to use the imposition file you selected in the Composition settings of the template. If you are just using Server and not API with the web services, I'm not sure how you could do this. Bryan
  23. Thanks Dan. I'm sorry for the confusion of the slip sheet. We have our own slip sheets that we make. I set them up in the layout as a body page and will call them based on a data field. Our sheets have the job number, which I figured out a way to extract the info from the data file name; a stack number; and then the record numbers in that stack. We print 700 records at a time and that makes up a stack. The stack number would just increment by 1 every 700 records in the data.
  24. I'm trying to get record numbers to imprint on body pages that we would use for slip sheets in a job. We print stacks of 700 records and the slip sheet goes on the top of the stack. I haven't worked much with counting and record numbers in Rules so I'm not sure how to accomplish this. I also add a stack number that would count up every 700 records on the same sheet. Stack 1 is 1-700, stack 2 is 701-1400, etc. Any hints of where to start with the rule would help. The end record number is different on every data file.
  25. I am trying to find a way to add a PDF file of pre-imposed set up (slip) sheets for our slitter to the beginning of a composed PDF. It is a 10 page PDF (5 sheets) with the crop marks needed for the slitter on it. I've been able to add a PDF in between pages in a composed PDF based on a data field in the past, but I haven't had luck with getting this file to combine with the composed output. I talked with support and they gave me a way to add more body sheets on compose but that didn't help. Is this even possible? Has anyone done anything like this before? I haven't found anything like this in the forum. I've tried making a body page and an overflow page and made the separate PDF a resource in the file and tried placing it and letting the extra pages go into the overflow pages but that didn't do what I needed. Any help to point me in the right direction would be appreciated. Thanks
×
×
  • Create New...