Page 1 of 1

Print failed to PDF after 3 pages

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

Re: Print failed to PDF after 3 pages

Posted: Tue Feb 06, 2018 12:58 am
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?

Re: Print failed to PDF after 3 pages

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

Re: Print failed to PDF after 3 pages

Posted: Tue Feb 06, 2018 2:06 am
by FourthWorld
It may be helpful to add a call to the syserror function when you check the result.

Re: Print failed to PDF after 3 pages

Posted: Tue Feb 06, 2018 12:06 pm
by JosepM
Syserror return 0.

Any idea?

Re: Print failed to PDF after 3 pages

Posted: Tue Feb 06, 2018 4:44 pm
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?

Re: Print failed to PDF after 3 pages

Posted: Wed Feb 07, 2018 12:53 am
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.
Captura de pantalla 2018-02-07 00.45.10.jpg
test page
Any idea why?

Salut,
Josep M