7
$\begingroup$

Here is an example:

nb = Notebook[
  {
   Cell[StringRiffle[Range[100], " "], "Text", FontFamily -> "Arial", FontSize -> 24]
  },
  PrintingOptions -> {    "PageSize" -> {595, 842},    "PaperSize" -> {595, 842}}
]

(* exports locally (WIN) and deploys to cloud for browser preview*)
SystemOpen@ First @ CloudExport[nb, "PDF", "temp/test-local.pdf"]

(* exports remotely (Cloud Unix) *)
SystemOpen @ First @ CloudEvaluate @ CloudExport[nb, "PDF", "temp/test-remote.pdf"]

enter image description here

enter image description here

Why isn't the output the same and how to make consistent PDF exports regardless of the operating system?

$\endgroup$
5
  • $\begingroup$ Not every viewer shows that but I found one that claims the remote versions uses CairoFont instead of Arial. $\endgroup$
    – Kuba
    Aug 10, 2023 at 6:51
  • $\begingroup$ Which makes 156861 related but not solving my problem yet. $\endgroup$
    – Kuba
    Aug 10, 2023 at 6:54
  • $\begingroup$ Not all fonts are same on windows and linux, even though they are called Arial on both., What happens if you use “serif” or "sans-serif" instead? From what I understand, these are supposed to be best for cross platform. $\endgroup$
    – Nasser
    Aug 10, 2023 at 9:21
  • $\begingroup$ @Nasser "Droid Serif" seems to work. But why not Arial? $\endgroup$
    – Kuba
    Aug 10, 2023 at 9:25
  • $\begingroup$ @Nasser also, Arial is saved as CairoFont, not a 'different' Arial. $\endgroup$
    – Kuba
    Aug 10, 2023 at 9:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.