Copy link to clipboard
Copied
After each election I get a set of html files that contain election reports generated by third party voting software.
The html files are wrapped in <html><pre> tags so the files display correctly with a fixed width font, ie Courier.
When I use Acrobat DC to convert the html file to pdf, Acrobat substitutes a Times New Roman font, ignoring the <pre> tag.
With the variable width font, the <pre> report formatting is lost, the columns don't line up.
I've tried inserting an inline style statement for font-family:courier, but that is ignored by Acrobat DC.
Correct report format
http://sussexcountyclerk.org/docs/elections/2016/20161108-Official/ANDOVER-BORO.html
Incorrect report format from Acrobat DC
http://sussexcountyclerk.org/docs/elections/2016/20161108-Official/ANDOVER-BORO.pdf
How can I convert html files to pdf from within Acrobat DC without losing the report formatting?
I don't mean print to pdf, I mean convert to pdf from inside Acrobat DC.
Update: The same behavior occurs when converting a plain txt file, fixed width formatting is lost.
Copy link to clipboard
Copied
Hello,
I will look into this further.
As a workaround try to print the file to PDF printer to get it converted to PDF.
Let us know if that helps.
Regards,
Tariq Dar.
Copy link to clipboard
Copied
Print to Adobe PDF creates a correctly formatted searchable PDF in IE11 and FF48. Print to Adobe PDF in Chrome 54 creates a correctly formatted, non-searchable image. All these approaches are workarounds to using Acrobat natively.
Copy link to clipboard
Copied
Thank you for confirming.
Also, would like to review this issue further using some of your resource files.
Is it possible for you to share those or some sample HTML files, using which you are able to reproduce the behaviour?
If you can, you may use GoogleDrive or Adobe Send or DropBox to share those files with us.
- Tariq Dar.
Copy link to clipboard
Copied
Here are links to a txt file and an html file. Download them, then, from inside Acrobat, create PDF from file.
https://drive.google.com/file/d/0B-uAza53CpkIRnhrMkY1b1VETHM/view?usp=sharing
https://drive.google.com/file/d/0B-uAza53CpkIbmdNeEpGaDBNRXc/view?usp=sharing
Note, you must manually set the page layout to landscape so the print lines don't wrap.
Copy link to clipboard
Copied
This is still a problem. Cannot create a report in fixed width font from a text/html file.
The link points to shared Google Docs containing the original html file, two pdf result samples, and a screen shot of the conversion settings specifying Courier font.
https://drive.google.com/open?id=1sBSPHHHDCWPQPk-1gZ-M1gJXY0aTb6v4
Copy link to clipboard
Copied
You can change the default font for HTML conversions, which is also used for TXT. While not a solution if you want mixed fonts, it might work for you. The trick is to go to convert a web page to PDF, and change the conversion settings. These settings are then applied to HTML and TXT conversion.
Copy link to clipboard
Copied
I did try to do that, perhaps I looked in the wrong place.
In Acrobat I chose Edit->Preferences->Convert To PDF->HTML
The message displayed is "There are no settings that can be edited in HTML" and the Edit Settings... button is grayed out.
Is there another place to change the default font for HTML files?
Copy link to clipboard
Copied
The settings are not in a logical place so you need to follow my directions: go to convert a web page (NOT an HTML document) to PDF. To put it another way, go to create a PDF from web page.
Copy link to clipboard
Copied
I tried that but my font settings were ignored. Here's what I did, from inside Acrobat DC:
File->Create->PDF from Web Page
Browse to HTML file
File Type: HTML
Click Settings
Body Text: Courier New (no other settings changed)
OK
Uncheck all PDF Settings
OK
Create
Resulting PDF is still proportional font, Times New Roman
I followed the above steps using a txt file as input, same result.
Copy link to clipboard
Copied
I tried your file from an older version of Acrobat, and it converted the < PRE > section to CourierNewPSMT without even being asked. You may have a new bug. (Not very new, of course) What is your exact version of Acrobat DC?
Copy link to clipboard
Copied
Adobe Acrobat Pro DC
Continuous Release | Version 2018.009.20044
"No updates available"
Copy link to clipboard
Copied
June 5, 2019. This is still a problem this morning, the day after our primary election.
Adobe Acrobat DC 19.012.20034
No updates available.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more