Print failed to PDF after 3 pages

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Print failed to PDF after 3 pages

Post by JosepM »

Hi,

I just try to print to PDF multiples cards.
After the 3th card, the print ever fail.
I'm on LC7.06

Code: Select all

on printCards
   
   ## Path to the pdf file we want to create
   put specialFolderPath("documents") & "/UserGuide.pdf" into tPDFPath
   
   open printing to pdf tPDFPath
   wait 0 millisecs with messages
   if the result is "Cancel" then
      ## The user has cancelled printing
      exit printCards
   else
      ## Print the card into the printable area
      put the number of cards of this stack into iNumCards
      
      repeat with x=1 to the number of cards of this stack
         put the number of card x into Card_Numb
         print card Card_Numb of this stack into 0,0,595,842
         answer the result
         wait 0 millisecs with messages
         print break
         wait 0 millisecs with messages
      end repeat

   end if
   close printing
   answer the result
   wait 0 millisecs with messages
end printCards
Any idea why fail?

Salut,
Josep M
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld »

What does "fail" mean? Does it crash? Does it just stop? Does it proceed as though everything's fine but the number of printed pages is wrong?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Print failed to PDF after 3 pages

Post by JosepM »

Sorry. Appear "print failed" into the Result. No crash, simply end with the PDF uncompleted.
The card have two text fields that load HTML source in monospaced font.
No images. Only text.
Checking the same stack on 8.1.7, then print correctly to PDF, but on 7.0.6 don't work.
But I want keep running on 7.0.6 if is posible.

Salut,
Josep M
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld »

It may be helpful to add a call to the syserror function when you check the result.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Print failed to PDF after 3 pages

Post by JosepM »

Syserror return 0.

Any idea?
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld »

If it's failing only in an old version but works in a newer version it sounds like a bug that was fixed.

Given the many bug fixes since v7, and the speed improvements, what is the benefit of using such an old version?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Print failed to PDF after 3 pages

Post by JosepM »

Hi,

Checking the PDF I see that the resulting pages are a little diffused, the text isn't clear, seems blurred when you print or view on screen.

About the LC7 I'm migrating from LC4.6.4 and I don't jump to the last so some plugins I use don't work actually.

Attach sample page.
test page
test page
Any idea why?

Salut,
Josep M
Post Reply