PDF linked in Word doc not importing on build machine

This forum is for all Flare issues related to importing files or projects.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

PDF linked in Word doc not importing on build machine

Post by ChoccieMuffin »

I have a project that behaves differently depending whether it's built on my local machine or on the build machine, specifically when importing a Word document that contains a link to a PDF stored in the same location as the source Word file. Both machines are using Flare 2019. In brief, it deals with the linked PDF as expected on my local machine (i.e., it copies the linked PDF to the \Output folder) but not on the build machine (the \Output folder doesn't contain the linked PDF and the log says it's missing) and the problem seems to occur during the import.

Here's the setup of my project folder, which is identical on local and build machines (thank you SVN!):
\Content
\Project
\Output
\Word_Source - contains the source Word files and the PDFs that one of them contains links to.
project.flprj

In order to automate the build and tidy up the mess that Word creates when you import a file, I have a script that does the following:
1. Runs a target called 1_Starter to import the files (auto-sync of all import files active).
2. Runs FAR on the newly created htm files to clean up Word's mess.
3. Builds the final target (auto-sync of import files turned off) to produce the final output.

When I build the target locally (and even when I run the script locally) I end up with my main PDF and the linked PDFs sitting nicely in the \Output folder, where they should be. However, when I run the script on the build machine, for some reason the log file contains extra stuff that implies it's "lost" the PDF and the end result is that they don't end up in the Output folder.

This is what the topic looks like ON MY LOCAL MACHINE in the text editor after it's been tidied up in FAR (note that Flare has put in an absolute path):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:sourceDocument="C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\A_US_input_files_and_results.docx">
    <head>
</head>
    <body>
        <h2>Blah</h2>
        <p>Blah blah blah.</p>
        <ul>
            <li class="ListBullet"><a href="C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\360_Product_Listing_N_ULSG.pdf">Product Listing (N_ULSG)</a>
            </li>
        </ul>
    </body>
</html>
And this is what it looks like on the build machine (note the lack of a path, but the PDF never gets put into the same folder as the htm anyway):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:sourceDocument="C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Word_Source\A_US_input_files_and_results.docx" xml:lang="en-us">
    <head>
</head>
    <body>
        <h2>Blah</h2>
        <p>Blah blah blah.</p>
        <ul>
            <li class="ListBullet"><a href="360_Product_Listing_N_ULSG.pdf">Product Listing (N_ULSG)</a>
            </li>
        </ul>
    </body>
</html>
Here's an extract from the log when it's importing that file on my local machine:

Code: Select all

Re-importing A_US_input_files_and_results.flimp...
Scanning source files...
Scanning A_US_input_files_and_results.docx...
Collecting Word styles. This may take several minutes...
Importing source files...
Converting Word document: A_US_input_files_and_results.docx...
Created topic: US Library product input files.htm...
Created topic: About the listings.htm...
Saving TOC file: A_US_input_files_and_results.fltoc...
Saving Header/Footer MasterPage: A_US_input_files_and_results.flmsp...
Created topic: A_US_input_files_and_results.flmsp...
Saving stylesheet: A_US_input_files_and_results.css...
Patching document links...
Copying generated files...
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\About the listings.htm
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\US Library product input files.htm
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\MasterPages\A_US_input_files_and_results.flmsp
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\Stylesheets\A_US_input_files_and_results.css
Copied file: C:\Projects\LIBRARIES_TRUNK\Flare_Projects\US_360_docs\US_360_Tutorial\Project\TOCs\A_US_input_files_and_results.fltoc
Saving import file A_US_input_files_and_results.flimp...
Here's the same section when it's building on the build machine - I've checked, the only difference is the name of the build location:

Code: Select all

Re-importing A_US_input_files_and_results.flimp...
Scanning source files...
Scanning A_US_input_files_and_results.docx...
Collecting Word styles. This may take several minutes...
Importing source files...
Converting Word document: A_US_input_files_and_results.docx...
Created topic: US Library product input files.htm...
Created topic: About the listings.htm...
Saving TOC file: A_US_input_files_and_results.fltoc...
Saving Header/Footer MasterPage: A_US_input_files_and_results.flmsp...
Created topic: A_US_input_files_and_results.flmsp...
Saving stylesheet: A_US_input_files_and_results.css...
Patching document links...
Copying generated files...
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\About the listings.htm
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\US Library product input files.htm
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\MasterPages\A_US_input_files_and_results.flmsp
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\Resources\Stylesheets\A_US_input_files_and_results.css
Copied file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Project\TOCs\A_US_input_files_and_results.fltoc
Saving import file A_US_input_files_and_results.flimp...
BUT, later on in the log file for the build on the build machine I see this:

Code: Select all

Processing topic: About the listings.htm
Missing linked source file: C:\LibraryTrunk\Flare_Projects\US_360_docs\US_360_Tutorial\Content\A_US_input_files_and_results\360_Product_Listing_N_ULSG.pdf
It can't be file length, because the file length is actually 12 characters longer on my local machine. So why, pray tell, does the same version of Flare (2019) behave differently on the two machines? Is there a setting somewhere I've missed? Any help very gratefully received.

I've tried running the import on the Build machine from inside Flare, but because of assorted security issues I don't have write permissions on that machine (the "user" that does the build is the automated builder, not me).

I'll update this post tomorrow when I've managed to get access to that machine so I can run Flare in the GUI on the build machine and see what happens. But obviously, any suggestions or thoughts are very welcome. I THINK I'm looking in the right place but obviously I could be wrong.

Thanks all.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: PDF linked in Word doc not importing on build machine

Post by doc_guy »

Where in the process is the PDF built? In the last step? Does the PDF come from the Word files you imported? Or is the PDF a separate document that is just included because you need to link to it?

Obviously, Flare can't find the PDF file in that location on the build machine. When you get to Remote Desktop to that server, so you can use the Flare GUI, check to make sure that if the file is supposed to be coming from source control that the file is actually there in the source.

I don't know what else to tell you. It should just work. Maybe a MadCap Help Desk request.
Paul Pehrson
My Blog

Image
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: PDF linked in Word doc not importing on build machine

Post by ChoccieMuffin »

doc_guy wrote:Where in the process is the PDF built? In the last step? Does the PDF come from the Word files you imported? Or is the PDF a separate document that is just included because you need to link to it?

Obviously, Flare can't find the PDF file in that location on the build machine. When you get to Remote Desktop to that server, so you can use the Flare GUI, check to make sure that if the file is supposed to be coming from source control that the file is actually there in the source.

I don't know what else to tell you. It should just work. Maybe a MadCap Help Desk request.
The PDF has nothing to do with Flare, it's a PDF showing results from the software we're documenting, generated by that software.
The Word doc that lives in the \Word_source folder contains a hyperlink to the rogue PDF which also lives in the \Word_source folder. (It works on my local machine, just not on the build machine.)
I have checked that the PDF IS in the location stated.

And yes, it should just work. But it doesn't. :cry: Next stop, Tech Support I think. (Unless anyone else has anything to add, she said, hopefully...)

EDIT:

I moved the whole thing to a different folder on the build machine, and it worked. So it's not an OBVIOUS Flare problem. I've now got the build manager telling me "just check the PDFs into the location Flare is looking for them"! Poor so-and-so doesn't see that that is NOT an acceptable solution!
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: PDF linked in Word doc not importing on build machine

Post by doc_guy »

That's weird. Glad you got it working. And yes, the build manager's "solution" is not an acceptable one from an automation perspective, so it is funny that it would come from a build manager.
Paul Pehrson
My Blog

Image
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: PDF linked in Word doc not importing on build machine

Post by ChoccieMuffin »

doc_guy wrote:That's weird. Glad you got it working. And yes, the build manager's "solution" is not an acceptable one from an automation perspective, so it is funny that it would come from a build manager.
He's a nice chap, and has helped me find the reason, but he does like to use sticky plasters a bit too often for my liking! :D

ANYWAY...

It would appear to be a bug somewhere in Flare. It took us loads of messing around, building, remote desktopping and general stupidity on my part, but it would appear that it doesn't import correctly IF THE USERNAME HAS LOTS OF DOTS IN IT!

Working on the build machine we ran just the basic Flare import, and it worked correctly.
We ran the build script (with me as user) and it worked correctly. (I have one dot in my username, which Flare converted to an underscore.)
The build manager ran the Jenkins script, but ran it using his username rather than the build username. He has one dot in his username, the build username has four) and it worked correctly.
We ran it again using the build username, and it didn't.

Bug reported (153464), and build manager is fixing the script to run with a different username, saying "I've been meaning to do that..." :D

So thank you for your patience and head-scratching.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: PDF linked in Word doc not importing on build machine

Post by doc_guy »

That is a strange bug. Way to troubleshoot it!
Paul Pehrson
My Blog

Image
Post Reply