Page 1 of 1

PDF problems

Posted: Wed Oct 09, 2013 4:16 am
by MaxDangerMouse
Hi,

I've got an app that creates a pdf report based on the contents of a couple of cards. It used to work well and now I've done something and can't seem to get it to work properly any more.

There are 4 cards. If I try to convert them all to pdf only the 1st works. If I try just the last 3 only the 2nd and 3rd pages come out and the fourth page doesn't show one of the fields.

Here's the code that I'm using.

Code: Select all

   put specialFolderPath("documents") & "/edCoachReport.pdf" into tPDFPath
   open printing to pdf tPDFPath
 
      Print card "CrepIntro" of this stack into 0,0,1000,1500
      print break
      Print card "CrepRes" of this stack into 0,0,1000,1500
      print break 
      Print card "Crep3" of this stack into 0,0,1000,1500
      Print break
      Print card "Crepquest" of this stack into 0,0,1000,1500
      Print break

   close printing
Is there anyone who understands the issues that can come up with printing to pdf that could help?

Thanks
Max

Re: PDF problems

Posted: Wed Oct 09, 2013 7:37 am
by CenturyMan1979
Have you tried it without the print breaks to see what your results are? I have a script that converts cards into a pdf but I am doing it with "print card [from leftTop to rightBottom]" and I did not use page break between my print commands. This might also have worked for me as I had formatted a group on a the card to be the size of the paper I was going to print on.

Re: PDF problems

Posted: Sat Oct 19, 2013 8:56 am
by MaxDangerMouse
Thanks

I tried it without the print breaks and still no luck.

I eventually worked it out though and thought I'd post in case anyone else had this problem.

I was populating the cards with text (within a field) that I'd pasted from MS word. After messing around with them a bit I realised there were some junk characters at the end of the field. When I removed those the PDF printing went back to working. I only discovered them when I opened the stack in windows (I'd been developing on a mac).

Hope that helps someone one day.

Max