2

This is a question concerning two areas. OSs and creating pdf-documents from LaTex-scripts. The point is the following. When I create a pdf-file under Linux using pdflatex, I can open the file under Windows only with some very specific and often proprietary tools. I have installed Texlive on my Computer running Ubuntu here. This file-opening-thing was already an issue in a print-shop where only Windows was running and the owner was not willed (and able) to try to open e.g with Sumatra-pdf, what could have worked. ...

I had to and could fix the problem by compiling the code under Windows where I have installed the MikTex-distribution (I think it also uses pdfLaTeX) and everything worked. Unfortunately a simple unix2dos won't do the task, unix2dos only converts depending on the conversion-direction carriage-returns and can do some recoding I think. Whatsoever, I tried it anyway and it tells me that a binary symbol 0x1C was found in line 8. I did a little research. This is the control charakter (fs) - file seperator. It is possible, that at this position a png-file is placed. In this thread someone resolved the problem not via "ghostscripting" but via converting png to pdf. How to overcome Acrobat Reader error 131 with a pdfLaTeX doc?

Anyway, I think such procedures should not be necessary. What could be the reason that all MikTex-documents can be opened under Linux but not vice versa? Is this a bug with in the programme pdfLaTeX or rather something else just depending on my installation or a unpredictably occurring thing? But against that stands that it works very well with `MikTeX. What can we do to overcome that.

closed as off-topic by Martin Schröder, user13907, Ruben, Mensch, Werner Aug 24 '15 at 20:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Martin Schröder, Community, Ruben, Mensch, Werner
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    We are going to need some examples, log files and likely demo PDFs. I've never had an issue with PDFs created on one platform opening on another platform. – Joseph Wright Aug 19 '15 at 18:20
  • Ok. How shall I provide those files? Is an online-Lunk to a folder ok. But maybe in one year or so, the link will expire, I don't exactly know. – Philipp H Aug 19 '15 at 18:27
  • There's no 'built in' way to share things that cannot be added to the question, so you'll need to go for a file sharing site. – Joseph Wright Aug 19 '15 at 18:31
  • 2
    For the record, I regularly open PDFs created with pdfLaTeX on a GNU/Linux machine in Adobe Reader on Windows. I've never had a problem. I also send them to people using OS X and Windows and have never had anyone say they couldn't open them. Also, my students use Beamer presentations and other documents, and they are opening them on a mix of Windows, OS X and who knows what. I have sometimes had issues opening files produced by pdfLaTeX on a photocopier and issues printing to a photocopier (directly or from a computer), but never trouble just opening one on a proper computer. – cfr Aug 20 '15 at 1:06
8

PDF files are binary files. They must not copied as text files with automatic line end conversion. Basically a PDF file is a list of objects (indirect objects with object number), whose position in the file is recorded in the cross ref table for fast lookup. When line endings are changed from Unix (1 byte = line feed) to to Windows/DOS (2 bytes = carriage return and line feed), then the positions are invalidated. Furthermore, the cross ref table expects the entries in a line with a fixed length (PDF not using object stream compression with compressed xref table). Changing the line ends additionally destroys the cross ref table.

Only few PDF viewers (e.g. AR) can open such a damaged PDF file by trying to parse the PDF to find the objects, when the cross reference table is corrupted.

Check your workflow for copying files from one system to the other. Use checksum tools (md5sum and friends) and check the file size to ensure, the PDF files are unmodified.

Sometimes it can help to put the PDF files via an archive. Also here, the files must be treated as binary files.

  • I didn't want to copy it as a text file. I don't understand your sentence "They must not copied as text files with automatic line end conversion.", could you please clarify this. I will then post a Link with the necessary files and I will try what you recommended me to do. – Philipp H Aug 19 '15 at 18:39
  • @PhilippH For example FTP programs will do either text or binary copying – Joseph Wright Aug 19 '15 at 18:41
  • 3
    @PhilippH You can omit the @someoneofyou, when the comment is directed to the author of the post. – Heiko Oberdiek Aug 19 '15 at 19:04
  • 2
    A service like OwnCloud (I never had this kind of problems with PDF files via DropBox) can cause this, if they treat PDF files as text files. There might be a configuration option to fix this. – Heiko Oberdiek Aug 19 '15 at 19:07
  • 1
    I have not yet compared the file sizes (and checksums). I store the files on my university server. As fast as it is possible, I will compile a new version with MikTek and check it. – Philipp H Aug 19 '15 at 19:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.