Missing PDF component?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Missing PDF component?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Missing PDF component?
Nothing in "the result"?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Missing PDF component?
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
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?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Missing PDF component?
If you're experiencing an error that's not being reported, that's a bug. Please consider submitting your recipe to the bug DB.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Missing PDF component?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Missing PDF component?
Super-cool tip, Lagi - thanks! Not only free, but handles eBook formats as well. I'll be putting it to use...Lagi Pittas wrote:Sumatra PDF reader.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Missing PDF component?
Lagi.
Thanks. i will check it out.
Craig
Thanks. i will check it out.
Craig
Re: Missing PDF component?
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Missing PDF component?
Jacque.
Craig
Well and good. I think I will suggest that this little piece of information be included in the dictionary.Other OSs will need a helper app.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Missing PDF component?
How does a PDF reader become a helper app for writing pdfs or is it using Firefox or chromes internal code?
Regards Lagi
Regards Lagi
Re: Missing PDF component?
I always thought PDF export would be "self contained" since LC supplies a "revpdfprinter.dll" of 1.1 MB!
Not?
Not?

-
- VIP Livecode Opensource Backer
- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Missing PDF component?
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
When I checked the file was 0 Bytes then I remembered - add
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
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
Code: Select all
close Printing
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?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Missing PDF component?
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
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