Can't specify File name in PDF Output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
rjplano
Propeller Head
Posts: 51
Joined: Tue May 05, 2020 10:08 am

Can't specify File name in PDF Output

Post by rjplano »

Flare 2020

It is my understanding that a PDF output file is named using the file name of the topic in the TOC. However, I'm always getting the file name to be the actual Target name, i.e., PDF_Target.pdf. What would cause the target not to use the topic name? I can enter a name in the Output File box of the Target General tab, and that works, but I don't want to have to do that, as in this particular case I'm changing the content of the TOC on a regular basis (TOC holds just the one topic that I want to build and publish). I've tried entering a variable in the Output File box but then the file name is [[[Undefined variable Heading.Level1]]].pdf, despite the fact that the topic starts off with an h1. Same result with "Any level" or "System Title" variables. I've tried with and without the 'Generate multiple documents for native PDF output' check box selected in the Target Advanced tab. Setting a Title in the PDF Options tab has no effect either.

Thanks.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Can't specify File name in PDF Output

Post by robdocsmith »

Hi,

Hard for me to work out your structure... You've got a target, a TOC that contains a single topic and you're generating the PDF for that topic/TOC? Usually a PDF filename comes from the target in the General tab. Can you force a change via the TOC? The topic should be a Chapter Break style, and there you can specify a filename for the Chapter. That way you can create a TOC that contains many topics, and define in the TOC which ones start a new PDF document and what the filename(s) should be. Does that make sense?

Rob
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Can't specify File name in PDF Output

Post by Chicago_HPT »

I'm just making an educated guess here, but the various Heading and Title variables appear to be designed for use within topics (and snippets) within the output. They won't work in a target because there's no relative location for a topic from the target itself. Again, I don't know for certain but my own experiments based on your question seem to support this notion.

How many different documents are you outputting? It seems that, even if you were able to use one of the variables successfully, you'd still have to open the target, change the TOC file, save the target again, and then build or publish the target. Every time. If can make a suggestion, perhaps consider creating separate targets for each output and entering the desired PDF filename accordingly. To reduce clutter in your Targets folder, you could save the related PDF targets in a subfolder. And to make it easy to build or publish them all at once, you could create a batch target for them.

Just a thought.

Cheers,
-jeff
rjplano
Propeller Head
Posts: 51
Joined: Tue May 05, 2020 10:08 am

Re: Can't specify File name in PDF Output

Post by rjplano »

Rob, jeff, thanks for the inputs.

Rob, yes you have the structure correct. I have already set the topic in the TOC as a Chapter Break. Setting the Chapter File Name using the Properties of the TOC entry does not seem to have any effect, as the output PDF is given the target name as its filename. Setting the Output File in the Target General tab does work and I'll probably go that route as I'm only building one PDF at a time.

jeff, just one PDF at a time, containing a single topic (it's kind of a special case). If I could use a variable, I would think I'd just have to delete the existing topic, if any, then drop the appropriate topic into the TOC and build.

I guess what's really puzzling me is that if I build a PDF target using a TOC that contains multiple topics and select the 'Generate multiple documents for native PDF output' option, each resulting individual PDF is named according to its topic title. Don't know why that doesn't work when there is only a single entry in the TOC. Setups are identical in every way that I can see other than the number of TOC entries. In fact, if I use the same target, changing only the Master TOC, the multiple-entry TOC is built with each PDF having its own, correct, filename, while the single-entry TOC builds a PDF with the target name.
Post Reply