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 » Tue Feb 06, 2018 12:02 am

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: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld » Tue Feb 06, 2018 12:58 am

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 » Tue Feb 06, 2018 2:02 am

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: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld » Tue Feb 06, 2018 2:06 am

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 » Tue Feb 06, 2018 12:06 pm

Syserror return 0.

Any idea?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Print failed to PDF after 3 pages

Post by FourthWorld » Tue Feb 06, 2018 4:44 pm

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 » Wed Feb 07, 2018 12:53 am

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.
Captura de pantalla 2018-02-07 00.45.10.jpg
test page
Any idea why?

Salut,
Josep M

Post Reply

Return to “Talking LiveCode”