Page 1 of 2

Missing PDF component?

Posted: Tue Apr 04, 2017 10:47 pm
by dunbarx
If I print a file to pdf, using the "open printing to pdf" command, in a Mac standalone there is no issue. But a standalone for Windows (Windows 7) requires Adobe Acrobat (or perhaps some other pdf writer) in order for the pdf to be generated and saved at all.

No error is thrown, but no .pdf file is created. This drove me nuts. Do I have this wrong, or am I doing something wrong?

Craig Newman

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 12:17 am
by FourthWorld
Nothing in "the result"?

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 2:27 am
by dunbarx
Richard.

Nothing. I placed queries all through the handler that does this when I was trying to track down the problem. I used "answer folder" to select a pathname to save to, and placed result checkers all around that and also all over the actual "open printing to pdf" section. All results are empty.

This makes sense, because the Mac does not care at all. No issues. That is what threw me.

If I run the Windows standalone on a machine that has Acrobat Pro resident, that machine works just fine. I was surprised at this, and it was only by luck that I tried running the standalone on that particular machine. If I had started there, I never would have known there was an issue.

I assumed that the pdf printing library in LC was all that was needed to create a viable pdf file in any platform. Unless I am doing something wrong, at least on Windows 7, this is not so.

Craig

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 3:35 pm
by dunbarx
It is more than that no error is thrown. In the standalone, I create both a pdf and a text file, saved to a folder of the user's choice. If I write and save the textFile before the pdf, that is, earlier in the handler, the text file is indeed created and saved, but the pdf is subsequently not. If I reverse the two operations, neither is saved. So the handler "aborts" or fails somehow without finishing.

This means that without Acrobat Pro on a Windows 7 machine, when the command "open printing for pdf" is executed, the handler must simply end. That an external program, or rather, absent that program can affect the proceedings of a running handler seems bizarre to me. I could understand if the pdf simply failed to be created, I think, but not this.

Watch this space.

Craig

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 5:21 pm
by FourthWorld
If you're experiencing an error that's not being reported, that's a bug. Please consider submitting your recipe to the bug DB.

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 6:58 pm
by Lagi Pittas
Hi Craig

If it helps I have an invoice application I wrote for a colleague and that runs perfectly on the 3 machines I have run it on.
None have Acrobat Reader on and I refuse to Use Adobe Reader Bloatware (and Norton Crapware if you must know). All these systems have the free Sumatra PDF reader.

there are even more pluses other than the small size it will read Mobi, EPUB, Djvu and CBZ/CBR comic books but I bet you already know that.

Regards lagi

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 7:32 pm
by FourthWorld
Lagi Pittas wrote:Sumatra PDF reader.
Super-cool tip, Lagi - thanks! Not only free, but handles eBook formats as well. I'll be putting it to use...

Re: Missing PDF component?

Posted: Wed Apr 05, 2017 9:07 pm
by dunbarx
Lagi.

Thanks. i will check it out.

Craig

Re: Missing PDF component?

Posted: Thu Apr 06, 2017 5:01 pm
by jacque
Creating a PDF is a complex operation and it makes sense for LC to pass it off to another app to do the work. OS X has native capability so it will always work there. Other OSs will need a helper app.

Re: Missing PDF component?

Posted: Thu Apr 06, 2017 5:34 pm
by dunbarx
Jacque.
Other OSs will need a helper app.
Well and good. I think I will suggest that this little piece of information be included in the dictionary.

Craig

Re: Missing PDF component?

Posted: Thu Apr 06, 2017 9:01 pm
by Lagi Pittas
How does a PDF reader become a helper app for writing pdfs or is it using Firefox or chromes internal code?

Regards Lagi

Re: Missing PDF component?

Posted: Fri Apr 07, 2017 11:02 am
by Klaus
I always thought PDF export would be "self contained" since LC supplies a "revpdfprinter.dll" of 1.1 MB!
Not? :shock:

Re: Missing PDF component?

Posted: Fri Apr 07, 2017 11:45 am
by Lagi Pittas
HI

I was sure it couldn't be as there is no fragment of ADOBE on my machines and there is no way that Sumatra PDF is going to have an API that LC cooulkd use even if it coulkd do other than read PDFs but .... You never know.

So I Booted my Virtial XP removed Sumatra created a simple program with a Button that

Code: Select all

Open printing to pdf "c:\pdf\test.pdf" 
print card
When I checked the file was 0 Bytes then I remembered - add

Code: Select all

close Printing
Ran it again and the file was 15K in size.

Reinstalled Sumatra PDF (20 seconds) and the PDF opens.

So Good news and bad news Craig - No it doesn't need a helper is the Good News , The bad news is you still have a problem.

Regards Lagi

Re: Missing PDF component?

Posted: Fri Apr 07, 2017 3:15 pm
by dunbarx
Well.

Good news? Bad news? Who has the time?

It turns out that the "revpdfprinter.dll" was of course included in the standalone build, but that another file, of about 4K, named "_revpdfprinter.dll" was as well. No idea where this could have come from, but it was placed in the folder which the other files, and did not work. I did not create this thing, and I have it. I may try to open in a text editor and see what it contains. But in the end I do not care.

Sorry to have caused such a ruckus.

Craig

Re: Missing PDF component?

Posted: Fri Apr 07, 2017 3:38 pm
by Lagi Pittas
Hi Craig

None of us has the time , but I tested it out just in case - I was pretty sure that it was not the case but at least I know for sure.

Glad it's all working.

Lagi