Unable to generate Word output

Explorer ,
Oct 21, 2019

Copy link to clipboard

Copied

Every time I try to generate Word doc output in RoboHelp 2019 this is what I receive. All other outputs generate successfully so I'm certain that default.css is working totally fine.

 

 

Unhandled 
 CssParser error: line 1 col 20: "'" expected.  CSS => p{font-size: 12pt'}

 

 

I would really appreciate your help in fixing this error. I've the latest patch update of RoboHelp too. 

TOPICS
New UI, Single source layouts

Views

207

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Unable to generate Word output

Explorer ,
Oct 21, 2019

Copy link to clipboard

Copied

Every time I try to generate Word doc output in RoboHelp 2019 this is what I receive. All other outputs generate successfully so I'm certain that default.css is working totally fine.

 

 

Unhandled 
 CssParser error: line 1 col 20: "'" expected.  CSS => p{font-size: 12pt'}

 

 

I would really appreciate your help in fixing this error. I've the latest patch update of RoboHelp too. 

TOPICS
New UI, Single source layouts

Views

208

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 21, 2019 0
Adobe Community Professional ,
Oct 21, 2019

Copy link to clipboard

Copied

Although your problem is similar in that it relates to not being able to generate a Word output, the error is different. For that reason I think it best to put it in a separate thread which I have done.

 

You have ruled out default.css saying it is working fine in other outputs but that does not necessarily mean it will work with the Word output.

 

First thing to try is to create a new project and close it. It's just to get a clean default.css rather than the one you are using. Copy it into your project with a change to the name such as default_word.css.

 

Create a new master page and do nothing with that other than link it to default_word.css.

 

In the Word preset select that master page and generate.

 

Post back with whether or not it generate a document and we can take it from there.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 1
Explorer ,
Oct 21, 2019

Copy link to clipboard

Copied

I followed your instructions and tried to generate again, but I still get the same error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 0
Adobe Community Professional ,
Oct 21, 2019

Copy link to clipboard

Copied

That tends to rule out it being a CSS issue notwithstanding the error message. I am suspecting an issue with one or more topics but the problem is which one?

 

  1. In your main project create a new TOC called Print for ease of identification. Initially just put your default topic in it.
  2. You have a master page linked to the clean default.css. Create another master linked to your own CSS.
  3. Create two Word presets identical except for which master page they use. Link one each of the master pages. Both should use the Print TOC.
  4. Generate both.

 

If one or generates OK and the other does not or both have the problem post back.

 

If both generate OK, add a few more topics to the TOC and try again until you reach a point where one or both fail. The problem will be with the last batch of topics you added. Make a note of those and just post back that you have identified the batch.

 

It's late here but I will look for the results in the morning.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 0
Adobe Community Professional ,
Oct 21, 2019

Copy link to clipboard

Copied

Somewhere in your project you have  a font-size css property with an apostrophe at the end. But, it's not easy to just search for font-size: 12pt' because the apostrophe will have been converted to an entity code if it's in a topic.

 

I replicated the error in the Salesbuilder project by opening a topic and clicking in a paragraph, then in the General tab of the Properties Panel, I typed an apostrophe after my font size. This inserts an inline style in that particular paragraph. (It doesn't show up once you've saved and closed the topic, but you do get a scary and unhelpful error if you click inside that paragraph, but clicking randomly in topics is hardly productive. 🙂 )

 

You can search for all instances in RH2019.0.9. For earlier version of 2019 New, you'll need to use a third party tool, such as Notepad++, but the principles will be the same.

 

  1. In the log file, copy the text between the curly brackets: font-size: 12pt'. Don't copy the curly brackets.
  2. Select Edit > Find in All Files.
  3. Paste the text into the Find field.
  4. Replace the ' with &. We need to do this because in topics, the ' has been translated into entity codes behind the scenes. 
  5. Leave Replace with blank.
  6. Expand Settings and select Find in source view.
  7. Click Find All. A list of matches will show at the bottom of the Find and Replace panel.

 

If there's only a few occurences, you can just click on each result and manually change them. Assuming you don't need the inline style, I'd delete the whole style part of the p tag. However, it depends on how your project is set up, so I can't offer definitive advice.

 

If there are a lot, you can do a fresh find and replace, but what you need to do may depend on how your project is set up.

 

Try running the search, and see what you find. You can always post back if you're unsure.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 1
Adobe Community Professional ,
Oct 21, 2019

Copy link to clipboard

Copied

Taking my hat off to Amber for finding that one.

 

I followed the idea of adding an apostrophe to the font size and then looked at the topic in source view. It seems to convert the apostrophe to the entity code below.

'

 

I'm thinking you should be able to do a find and replace on that.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 0
Adobe Community Professional ,
Oct 21, 2019

Copy link to clipboard

Copied

... and back up the project first. Find and replace operations can wreck a project quicker than they fix it.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2019 0
Adobe Community Professional ,
Oct 22, 2019

Copy link to clipboard

Copied

Thanks Peter, my test also showed the same number code (').

 

I didn't suggest searching and replacing that specific entity code, because there might be places where you want to use it in your content; or there might be other entity codes that need to be replaced, for example ' or '. (It's hard to know what codes might have gotten in there and how.) Doing the search I suggested would find all of those options and you can decide what text you need to find and replace from there.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 22, 2019 0