A PDF generated with PDFmake is fine on the computer but messy when printed - pdf

I'm generating a PDF with nodeJS and pdfmake (this one: https://www.npmjs.com/package/pdfmake).
When I display the PDF on my computer, everything is fine. My PDF has several pages, the tables and paragraphs are fine, the colors are fine, etc. But when I print it (even in a file), look at what I have, everything is on a unique page and all the letters seem crushed, the tables have disappeared, etc:
What could possibly go wrong? I precise I download the file on my computer and open it with my usual PDF viewer.

Related

Acrobat Reader refuses to open my .pdf but macOS' Preview does. How to diagnose the reason?

I've built my own .PDF carefully following Adobe PDF specifications. macOS has Preview and that opens and displays the PDF document properly, but Acrobat Reader reports an error, not specified, and does not display the document.
If I open it with Preview and export it from there as another PDF, the result is shown properly by both Preview and Acrobat Reader.
The Preview version is somewhat inexplicably complicated and I cannot determine what difference was done by Preview to allow Acrobat to handle it.
Nor have I been able to find software, even from Adobe's site, that will diagnose the problem.
I have attempted many reasonable variations, additions, etc. on my PDF, to no avail.
What's the secret formula to unlock the beast?
In response to the request, here's an abbreviated copy of the PDF file. All the controlling objects are present but I've deleted portions of the streams to spare you the scrolling. There are two fonts on one page which is an amalgam made of two separate source PDFs, one generated by me and the other from a different supplier, hence the preliminary /Contents objects setting up scaling preliminary to each page object.
Well, after placing the sample here, I get a reject message saying there was an error submitting the edit.
I'm going to try again after eliminating all the compression code in the streams and much of the uncompressed formatting code, to save you from all the scrolling.
(PDF code removed as requested. Stay tuned for update.

Can a browser re-open a downloaded file rather than downloading the file each time it gets requested?

Here's the scenario. We have a table with a list of PDFs that are all pretty large (250mb each). In some cases, our links in the table go to the same PDF (but different pages).
Currently, when a user clicks on a link for a PDF, the browser downloads a new copy of the PDF. So if there are three links to three different pages in the same PDF, the browser will download all 250mb of the PDF fresh each time.
What we'd like to do is have the PDF download the first time, and then when the user clicks on another link to the same file, the previously downloaded version opens rather than downloading the same file again.
Is this even possible?

PDF cannot display Chinese fonts in table of contents

I made a PDF file from Latex (using TexMaker).
Acrobat Reader is able to display BOTH the text and the table of contents in Linux.
But Acrobat Reader is unable to display the table of contents in Windows XP (the Chinese characters came out as boxes). However, the text is displayed correctly.
I tried to embed the fonts into the PDF but the various methods are not 100% successful, so I'm not sure if the fonts are embedded correctly or not. Anyway, the table of contents remain unreadable in Windows.
I wonder if it is really an font embedding problem? Or do I need to install these "Adobe Reader X Font Packs":
https://www.adobe.com/support/downloads/detail.jsp?ftpID=4883
My concern is that I'd like my PDF to be readable in Windows, including the table of contents (and preferably without further installations). If this is possible...
I suspect you are talking about "bookmarks" and not saying part of the text in the document is ok and part is not. PDF Bookmarks are part of the UI of the application and are not selected from embedded fonts. Therefore, the system you are running on needs to know how to handle fonts in the language(s) of choice.
See https://forums.adobe.com/thread/1144972?start=0&tstart=0
Embedding the fonts will have no effect on the bookmarks.

ExpertPdf - how to generate pdf with marking text possibility from HTML

I'm using ExpertPDF library to generate PDF. I had the same code on two different servers. On one of them PDF was generated as a text (I could mark text in pdf and copy). On the second server PDF was generated as a picture, so I couldn't mark text in PDF file.
What is the differenc? Where should I looking for an error?
Now, after installing windows updates on all servers PDF is generateing as a Picture. I think, that updates had main influence on that change, but I'm not shure.
I had this problem too, with an older version of ExpertPdf that used IE for rendering. The problem is fixed in the last version (v9) that does not rely on IE anymore.

Recover text from PDF file when normal methods fail

I have a few hundred PDF files from which I need to extract sections of text. For many, pdftotext works fine, but for others, it misses large sections of text. If I open the PDF in Acrobat and select that text by hand and copy/paste into emacs and then view the file without an encoding, I get stuff like this:
Husband \364\200\200\272\364\200\201\213\364 etc.
How can I extract the text correctly?
I should mention that I've tried saving as text from Acrobat; also tried applying Acrobat's Document=>OCR feature before copying.
Why not convert the PDF to doc or txt first? See the guide:
http://www.aolor.com/pdf-converter/user-guide.html