Including PDFs in web -- a better way?

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Including PDFs in web -- a better way?

Post by ghillerson »

I've got this situation:
- I have 5 different books that reside together ("a docs suite") in an HTML5 web
- I also create a separate PDF for each book
- The final entry in the HTML5 TOC for each book is a link to the PDF
- The PDFs are stored in my Content/PDFs folder

And yes, because the PDFs are separate books, I have to conditionalize (unbind) cross-book links when generating the PDFs.

All of this works fine. But the build process is more awkward than I wish, and I'm wondering if there's a better way. The issue is that I have to first build each PDF and then copy its output to my Content/PDFs folder before doing the HTML5 build. So my build process is:
1) Use a Batch Target to build the PDFs
2) In Windows, copy each built PDF from the Output/ subfolder into my Content/PDFs folder
3) Build the HTML target

Step 2 is not difficult, but it does open the door to forgetting to copy those and than having outdated PDFs in my web. What I'd really like to do is have the PDF output go into my Content/PDFs folder, but Flare won't allow that (understandably).

I'm guessing someone else has encountered this and thought up a better solution? If so, please let me know.

Thanks in advance,
Gary
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Including PDFs in web -- a better way?

Post by wclass »

Here's a possibility to try.
In your batch job, have an extra step that "publishes" the newly generated PDF into the Content/PDF folder
Margaret Hassall - Melbourne
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: Including PDFs in web -- a better way?

Post by ghillerson »

Brilliant! Thank you.

I had only previously used destinations for publishing online; didn't realize I could publish to the file system. Many thanks.

Gary
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: Including PDFs in web -- a better way?

Post by ghillerson »

Well, it works, but Flare seems to have a bug - as soon as I open the batch target, Flare posts a message "The selected destination directory is inside the project folder. Files and folders will be merged or overwritten. Are you sure you want to proceed?" I click Yes.

It once again poses the question. This happens repeatedly, non-stop. Beyond annoying. If I do the build and publish, it works, but the message window is constantly bringing itself to the front, asking, and doing it again. I'll file a bug report.
whunter
Sr. Propeller Head
Posts: 429
Joined: Thu Mar 12, 2009 4:49 pm
Location: Portland, OR

Re: Including PDFs in web -- a better way?

Post by whunter »

I got around that error by using external resources. I published the PDF to a designated external resources folder, then I copied the file into my project and enabled the option to keep the file in sync. So going forward, I publish then sync. Requires two clicks instead of one but at least I don't get that error.
peckerdunne
Propeller Head
Posts: 32
Joined: Thu Apr 08, 2010 12:19 pm
Location: Watford, UK

Re: Including PDFs in web -- a better way?

Post by peckerdunne »

I use mapping to achieve this.
I work on my project files on our \\errol server, which I mapped to P: (P:\manuals\MyFlareProject\).
I created another mapping (V:) for the same server.
In my PDF target dialog, I set the Output folder to V:\manuals\MyFlareProject\Content\Resources.
I then use a batch file to build the PDF and online versions (generate the PDF files first).

Works fine.
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: Including PDFs in web -- a better way?

Post by ghillerson »

I can see how that works, but it's a bit more trouble than I want to go through, especially since Margaret's solution is the one that I think really makes sense, and it works except for a bug in Flare that causes an endless message loop :-). Thanks for the idea; I'll definitely keep it in mind.
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: Including PDFs in web -- a better way?

Post by ghillerson »

By the way, I can build the PDFs in my batch target if I don't use Publish in the batch. I can then publish them individually using that destination; Flare asks me to confirm, I do, and it merrily goes on its way, as it should.

It's only in the context of publishing from a batch target with multiple PDF publishes to within the project that it loops on the confirmation message.
Post Reply