[ 
https://issues.apache.org/jira/browse/SOLR-4886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705235#comment-13705235
 ] 

Hoss Man commented on SOLR-4886:
--------------------------------

bq. The only thing that's weird-ish in the PDF is that the "Back to Top"

good catch, i fixed that in the PDF CSS

bq. I had meant to mention that the fonts supposedly can be imported with a URL 
in the CSS pre-Confluence 5.x. I've never tried that with the PDF export 
specifically, but it should work if you can find a place to host the font file.

I beat my head against this a lot today, and came to two main conclusions...

h3. 1) The PDF Export will in fact let you pull in remote fonts.

* It seems to be picky about the CSS syntax, if i try to specify a font-family 
name in the @font-face it freaks out, but if i use the exact syntax from the 
confluence doc example, it seems to work
* {code}
@font-face {  
  src: 
url(http://people.apache.org/~hossman/tmp/freefont-20120503/FreeSans.ttf);   
  -fs-pdf-font-embed: embed;   
}   
@font-face {  
  src: 
url(http://people.apache.org/~hossman/tmp/freefont-20120503/FreeSerif.ttf);   
  -fs-pdf-font-embed: embed;   
}   
@font-face {  
  src: 
url(http://people.apache.org/~hossman/tmp/freefont-20120503/FreeMono.ttf);   
  -fs-pdf-font-embed: embed;   
}   
body {  
  font-family: FreeSans;  
  font-weight: normal;  
  font-style: normal;  
}  
pre, tt, kbd, code, samp {   
  font-family: FreeMono;   
  font-weight: normal;  
  font-style: normal;  
}  
.unicode-text {  
  /* FreeSerif reportedly has better unicode code block coverage then FreeSans 
*/  
  
  font-family: FreeSerif;  
  font-weight: normal;  
  font-style: normal;  
}  
{code}
* i had a typo in the remote URL the first time i tried using an "http://..."; 
font-face src url, and got a horrible error from the PDF export, which was a 
good sign (once i fixed it)
* looking at the "properties" of the generated PDF, i can see that (a subset 
of) the FreeSans, FreeSerif, and FreeMono fonts are embedded in the final PDF
* in general, the text of the PDF looks visible different using the "FreeFonts" 
then using the default fonts

h3. 2) for some reason, even using the FreeFonts, the non-latin characters in 
the PDF still don't show up.

* the various in/out examples in languages like Arabic, Chinese, and (some) 
Greek don't display at all in the PDF
* A simple HTML file containing same unicode characters and pulling in the same 
FreeFont files via CSS, looks just find in firefox (and looks visibly different 
then if those css fonts are disabled)

----

At this point i'm kind of stumped as to how to proceed ... if it were just a 
matter of the exporter not being able to _get_ the fonts i could talk to infra 
about installing them on the machine -- but all evidence indicates that the 
fonts are being embedded into the PDF just fine ... thye just don't seem to be 
rendering these non-latin1 characters.




                
> configure, test, and document PDF export process of SOLR CWIKI
> --------------------------------------------------------------
>
>                 Key: SOLR-4886
>                 URL: https://issues.apache.org/jira/browse/SOLR-4886
>             Project: Solr
>          Issue Type: Sub-task
>          Components: documentation
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: solr-090713-2308-8288.pdf
>
>
> * add the ASL as a page in the wiki such that it appears early in the 
> exported PDF
> * test that exporting the PDF works ok with the large space
> * review the exported PDF for problems
> * confirm/tweak-configs so that PDF exporting can done really easily, ideally 
> automatically
> * document/script steps to create PDF on each solr release.
> Lots of tips here: 
> https://confluence.atlassian.com/display/DOC/Providing+PDF+Versions+of+your+Technical+Documentation

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to