Jump to content

ThePorge

Members
  • Posts

    89
  • Joined

Posts posted by ThePorge

  1. I guess I was thrown off as I thought I was testing the output. I had commented out the match to see the result for the sole purpose of seeing exactly what I was working with. Only the input file name showed up in my output file's name and not the whole path.

     

    Conversely, I did as you said and put the result into a text box and it did contain the whole path. That seems to confuse me a bit as I seem to be getting different results. Is there something I am missing here?

     

    Thanks for you help btw and the

    var inputName = GetFileName(FusionPro.Composition.inputFileName);

    works great!

  2. I'm trying to extract a job number from my input file name. This is in the OnRecordStart Rule.

     

    var inputName = FusionPro.Composition.inputFileName;

    //In this instance the file name is "140583_Combo.xls"

     

    inputName = inputName.match(/^\d+/);

     

    if (FieldChanged("CredFmType")) {

    FusionPro.Composition.OpenNewOutputFile(inputName + "_" + Field("CredFmType") + "." + FusionPro.Composition.outputFormatExtension);

    }

     

    This outputs the pdfs with null where the job number should be. If I replace var inputName = FusionPro.Composition.inputFileName; with

     

    var inputName = "140583_Combo.xls";

     

    It works fantastically. I'm sure I'm overlooking something, but I can't seem to figure it out. Any help out there?

    Tks in advance!

  3. Dan, Your guidance is always appreciated. I was trying to put the pdf box assignment in the graphic rule. I had mistakenly been trying to accomplish this by assigning the pdf box before the variable was a resource...

     

    This....

    var myChart = 11; //Actually this var is also calculated earlier in the rule

    myChart = myChart + "Row.pdf";

    myChart.pdfbbox = "Artbox";

    return Resource(myChart + "Row.pdf");

     

    vs this....

    var myChart = 11; //Actually this var is also calculated earlier in the rule

    myChart = Resource(myChart + "Row.pdf");

    myChart.pdfbbox = "Artbox";

    return myChart;

  4. Dan,

    Is there not a way to have the resource in a graphic frame be a specific size? eg. 77% or 7200px by 14400px. I can see how to do this for a inline graphic, but not in a Graphic frame.

     

    fyi. I'm trying to get the results I want by using the OnRecordStart rule with the following:

    "ChartBox".PDFBoundingBox = "ArtBox";

    I have my graphic Frame named ChartBox, and verified the ArtBox in the pdf is the size I need....but this is not working either.

  5. I unmounted the server and connected with smb. Relinked the file and it still didn't work.

     

    Next I moved the file to my desktop and linked to it there and finally it previewed correctly.

     

     

    ***The only reason we still use afp is dealing with Type 1 fonts and a old backlog of T1 fonts. If it was up to me I'd throw them suckers in the trash bin of history, but we still see them come from customers on a regular basis....pity.

  6. and this problem come again. Outputs to a pdf just fine, but when previewing the file (a pdf resource) does not show up. There is also a jpg variable image that does show up. I tried using the create resource option and get a "File does not exist" error. See attached screen shot of the error and the info window side by side. Any more ideas?

    ScreenShot2019-07-23at11_06_41AM.thumb.jpg.7c6118700833ed92bc516126fe756172.jpg

  7. Setting up without a rule first question.

    After removing my rule I have no option to add this new variable to a FusionPro Text frame via the variable dropdown. It also can't be typed using Chevrons in the text edit window...However, if I type the new variable in BBedit with the Chevrons and then copy and past I can add the variable to the text edit window via copy and paste. Is this the expected behavior or should I go thru the trouble of making a rule so I can select it and then when completed delete the rule?

  8. I took out the page names and changed my code per your suggestions to

    //Look to the Javascript Globals settings for the declared variables. var pharmAdd=[], pharms = [], address1, address2, address3, pharmacy1, pharmacy2, pharmacy3;

     

    function myReturn(a){

    if(a !=""){

    a = "\n" + a;

    }

    return a;

    }

    function myPh(a){

    if(a !=""){

    a = "\nP: " + a;

    }

    return a;

    }

    function myFax(a){

    if(a !=""){

    a = "\nF: " + a;

    }

    return a;

    }

     

     

    //Assign Pharmacy Names to pharms array and corresponding address to pharmAdd array.

    //Allows the skipping of data rows that don't contain a Pharmacy and shifts the data forward. eg. All data in group 3 goes to array 2 if group 2 is empty.

    for (var i = 1; i <= 3; i++)

    {

    if (Field("Pharmacy" + i)){

    pharms.push(Field("Pharmacy" + i));

    pharmAdd.push(Field("Street" + i) +myReturn(Field("Suite" + i)) +"\n"+ Field("City" + i) +", "+Field("State" + i) +" "+Field("Zip" + i) + myPh(Field("Phone" + i)) + myFax(Field("Fax" + i)));

    }

    }

     

    if (pharms[0]){

    address1=pharmAdd[0];

    pharmacy1 = pharms[0];

    }

    if (pharms[1]){

    address2=pharmAdd[1];

    pharmacy2 = pharms[1];

    }

    if (pharms[2]){

    address3=pharmAdd[2];

    pharmacy3 = pharms[2];

    }

     

    var frontPage = ((pharms.length - 1) * 2) + 1;

    FusionPro.Composition.SetBodyPageUsage(frontPage, true );

    FusionPro.Composition.SetBodyPageUsage(++frontPage, true);

     

    However when I compose it I get the following which again has me baffled??

    Composing record #1, input record 1

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 9

    Composing record #2, input record 2

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 11

    Composing record #3, input record 3

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 15

    Composing record #4, input record 4

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 19

    Composing record #5, input record 5

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 25

    Composing record #6, input record 6

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 29

    Composing record #7, input record 7

    uncaught exception: Error: In SetBodyPageUsage(), invalid page number 31

    Composing record #8, input record 8

    Job ended 15:40:16 - 1541101216.

    Total Job Time:

     

    ...and good Lord I looked and that code for two days and didn't see I miss-spelled length...AAAAhHHHHHHHH!!!!!

  9. Here is everything I currently have in the OnRecordStart

    **Note. I'm seeing some weird spaces in my code previewing on the web page that don't exist

     

    //Look to the Javascript Globals settings for the declared variables.

     

    function myReturn(a){

    if(a !=""){

    a = "\n" + a;

    }

    return a;

    }

    function myPh(a){

    if(a !=""){

    a = "\nP: " + a;

    }

    return a;

    }

    function myFax(a){

    if(a !=""){

    a = "\nF: " + a;

    }

    return a;

    }

     

    if (Field("Pharmacy1")){

    pharms.push(Field("Pharmacy1"));

    pharmAdd.push(Field("Street1") +myReturn(Field("Suite1")) +"\n"+ Field("City1") +", "+Field("State1") +" "+Field("Zip1") + myPh(Field("Phone1")) + myFax(Field("Fax1")));

    }

     

    if (Field("Pharmacy2")){

    pharms.push(Field("Pharmacy2"));

    pharmAdd.push(Field("Street2") +myReturn(Field("Suite2")) +"\n"+ Field("City2") +", "+Field("State2") +" "+Field("Zip2") + myPh(Field("Phone2")) + myFax(Field("Fax2")));

    }

     

    if (Field("Pharmacy3")){

    pharms.push(Field("Pharmacy3"));

    pharmAdd.push(Field("Street3") +myReturn(Field("Suite3")) +"\n"+ Field("City3") +", "+Field("State3") +" "+Field("Zip3") + myPh(Field("Phone3")) + myFax(Field("Fax3")));

    }

    //Allows the skipping of data rows that don't contain a Pharmacy and shifts the data forward. eg. All data in group 3 goes to 2 if 2 is empty.

    if (pharms[0]){

    address1=pharmAdd[0];

    pharmacy1 = pharms[0];

    }

    if (pharms[1]){

    address2=pharmAdd[1];

    pharmacy2 = pharms[1];

    }

    if (pharms[2]){

    address3=pharmAdd[2];

    pharmacy3 = pharms[2];

    }

     

    if (pharms.lenght == 1){

    FusionPro.Composition.SetBodyPageUsage("One",true);

    FusionPro.Composition.SetBodyPageUsage("Two",true);

    FusionPro.Composition.SetBodyPageUsage("Three",false);

    FusionPro.Composition.SetBodyPageUsage("Four",false);

    FusionPro.Composition.SetBodyPageUsage("Five",false);

    FusionPro.Composition.SetBodyPageUsage("Six",false);

    }

     

    if (pharms.lenght == 2){

    FusionPro.Composition.SetBodyPageUsage("One",false);

    FusionPro.Composition.SetBodyPageUsage("Two",false);

    FusionPro.Composition.SetBodyPageUsage("Three",true);

    FusionPro.Composition.SetBodyPageUsage("Four",true);

    FusionPro.Composition.SetBodyPageUsage("Five",false);

    FusionPro.Composition.SetBodyPageUsage("Six",false);

    }

     

    if (pharms.lenght == 3){

    FusionPro.Composition.SetBodyPageUsage("One",false);

    FusionPro.Composition.SetBodyPageUsage("Two",false);

    FusionPro.Composition.SetBodyPageUsage("Three",false);

    FusionPro.Composition.SetBodyPageUsage("Four",false);

    FusionPro.Composition.SetBodyPageUsage("Five",true);

    FusionPro.Composition.SetBodyPageUsage("Six",true);

    }

    /*switch(pharms.length){

     

    case 1: FusionPro.Composition.SetBodyPageUsage("One",true);

    FusionPro.Composition.SetBodyPageUsage("Two",true);

    break;

    case 2: FusionPro.Composition.SetBodyPageUsage("Three",true);

    FusionPro.Composition.SetBodyPageUsage("Four",true);

    break;

    case 3: FusionPro.Composition.SetBodyPageUsage("Five",true);

    FusionPro.Composition.SetBodyPageUsage("Six",true);

    }*/

  10. I've got a test data file containing 7 records. When I compose the file I only get one record output. "All" is selected in the compose window. The following text is from the message log (Minus the header info):

    Composing record #1, input record 1

    Composing record #2, input record 2

    Composing record #3, input record 3

    Composing record #4, input record 4

    Composing record #5, input record 5

    Composing record #6, input record 6

    Composing record #7, input record 7

    Job ended 09:32:19 - 1540992739.

    Total Job Time: 1s

     

    I'm not getting any other errors.

     

    fyi. This file uses JavaScript code in the OnRecordStart callback to set the Page outputs and some address fields that may or may not contain an address. On my machine this file also exhibits the Preview jpg not showing, but being correct on output.

     

    Mac 10.13.6

    FusionPro® VDP Creator 10.0.26

    Acrobat Build: 19.8.20080.306727

    :confused:

  11. This just started to happen to me. When composing the images are there.

     

    I also tried making the image a resource. Created a rule that returned said resource. Applied the rule to the image box and nothing when Previewed.

     

    I have also tried a restart and having no other software running.

     

    Mac 10.13.6

    Acrobate Build: 19.8.20080.306727

    FusionPro® VDP Creator 10.0.26

     

     

    Also tried copying the job over local and unmounted the network drive. Relinked the data file, checked that the resource was still "ok" and previewed. Same result, no preview.

    Next, I gave it the ol' try without extensions running (shift key down with restart) and nope that didn't do it either....hmmmmm

  12. I'm using the XML templated supplied with FusionPro to create a barcode from the 31 length string of numbers created by our mail software. When I preview this it looks fine, but upon output I'm getting a string of numbers.

     

    Also, while looking on the User Forum I noticed that this rule expects a string with a length of 20 characters and reports the warning for any other length. The thread also noted that the barcode is still correct with the 31 Characters. Is that correct?

  13. The "DLOH_INVISIBLE-LAYER" seems to be a layer created in the pdf from InDesign when using the Fusion Pro Plugin. The problem I'm running into is that even tho this layer is off it is still printing in the final output. Has anyone else seen this? This happens even when going the the layers Properties and selecting to never print. I've corrected for now by reverting my pdfs to the older non layered version, but I would like a better solution or know if this is just a bug.

     

    Oh, forgot useful info:

    Mac 10.13.4

    InDesign 13.1

    Acrobat Pro DC Build: 18.11.20040.280397

    FP 10.0.26

  14. The way I read your question is that you want to remove all leading and trailing spaces and then two or more spaces from inside your string. I'd think the following would do what you'd like.

    function trimAll(x) {

    x = x.replace(/^\s*|\s*$/g, "");

    x = x.replace(/\s+/g, " ");

    return x;

    }

  15. Hmmm....That's where I didn't have any luck as the fonts were already synced in TypeKit and working in the Adobe apps. It was after that I tried the Load in FusionPro and then the restart of FP and Acrobat. Thankfully the job was simple and I was able to just run it from InDesign.

     

    Actually haven't had much time to investigate this further, but I think I'll be able to get back into it today. I did manage to find where Adobe puts the fonts so I might look into getting them working from there.:cool:

  16. Has anyone been able to use Adobe TypeKit fonts with FusionPro?

    From the reading I've done they are supposed to be available to the system (Mac 10.13.3), but I've got no idea where they are. I tried to run a "Load Fonts" in FusionPro....that yielded nada. :(

     

    Somehow I'm getting images of Carnac the Magnificent tearing open an envelope and Carnac telling me of another fine problem brought to you by the minds of Adobe.....

  17. Ok, got it working. Here is what I did. The resource pdfs were in a "Links" folder which had some of the linked resource files. Inside of the Links folder I also had a folder called "Current". I had put them in the Current folder so I could easily swap out the contents of the Current folder with identically named pdfs without fpo copy in them. These fpo pdfs were for being able to correctly position my FusionPro text and graphic boxes only.

     

    This would preview correctly until yesterday. It would always compose correctly. I had also tried removing and re-importing all these resource pdfs. Once I moved the pdfs in question up one level to the Links folder the preview function started working again. Guess I'll know not to do that anymore.

     

    fyi: the Links folder was at the same level as the FusionPro document. I have been working on all of this locally on my laptops hard drive.

×
×
  • Create New...