PDF creation fails when variables are used

Post Reply
miserabledutchman
Newbie
Posts: 4
Joined: Thu Mar 26, 2015 7:52 am

PDF creation fails when variables are used

Post by miserabledutchman »

Hello
Here's my scenario:
I use an external HTML jobticket which eventually returns back to the connector with variables populated (I can see that they come through with the right values when I export the preview to a variable xml.
I want to test certain properties of the PDF against the values entered on the form.

One specific variable is the number of pages the user says he has vs the number of pages actually found in the PDF.
I want preflight to fail if the two numbers dont match, and pass if they do match.

I test the value of /ValueDescription/MF_9 from the xml file (type=number - i modified it in the xml, changed it back to text, etc, made no difference, against the actuall number of pages in the PDF - tried this with standard preflight Page tab, and through an Action list.

All of the above consistently gives me no error in spite of making errors on purpose (1 page PDF, 5 pages entered in jobticket) where i'd expect an error. PDF file creation also fails and yet the connector opens a browses dialog so that i can tell it where i want the pdf. then, next thing an error pop up telling me that it cannot copy the file because the file doesn't exist (in other words it cannot put the created PDF in it's chosen location because the original was never made.

I hope this all makes sense, I'm stumped. Can someone shed some light on the issue for me? Much appreciated.
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: PDF creation fails when variables are used

Post by saitok »

Hi,

It seems to work fine on my Mac OS X 10.11.
I exported a PDF from Illustrator CC 2015 using Connect Plug-in 13.2.
I'm happy if the screenshot helps you.
Image

I think you can check if the temporary PDF is created in the following directory.
/private/tmp/<user name>/<connector name>/<number>

Regards, :mrgreen:
miserabledutchman
Newbie
Posts: 4
Joined: Thu Mar 26, 2015 7:52 am

Re: PDF creation fails when variables are used

Post by miserabledutchman »

Hi, thanks for the reply!

Looking through the log files I find a message saying that Pitstop library fails on calculating the value of a required variable. This i've since solved by aligning the variables correctly from scratch.

The problem I now face is a different one, probably worthy of its own topic, but here goes:

I need to use the External HTML option to do some server side queries on an external server, and then stop the entire job or let it continue with preflight as normal depending on the outcome.
Then, I need all the values that the individual fills in passed back to me so that I can evaluate the PDF against his input, PRIOR to uploading the file to Switch.
Is this possible?
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: PDF creation fails when variables are used

Post by saitok »

Hi,

Don't you use Metadata XML for your purpose?
What do you need to compare them by?

Sorry, I don't know much about External HTML... :?

Regards,
miserabledutchman
Newbie
Posts: 4
Joined: Thu Mar 26, 2015 7:52 am

Re: PDF creation fails when variables are used

Post by miserabledutchman »

I think I answered my own question, but with respect and thanks, here is the detail.

I do use Metadata XML, but the issue i'm having is that I want to use the External HTML feature to display custom jobticket from a webserver. Whatever the user enters there needs to be checked for in the PDF he put into the connector. The catch is that the connector seems to have no way to tell what was entered into the remote HTML form.

So in other words, for example:

I want the user to specify how many pages he has in his PDF so that I can check that the PDF actually conforms... I have a variable set up for it in the connector, named "pages".

I use an external HTML jobticket, he sees the external jobticket and enters 2. I save that value to a database.

The the local connector variable "pages" will never assume the value 2 because, if i understand it correctly, the external HTML jobticket doesn't pass values back to the actual connector (technically it wouldn't be able to in most cases, in any event). The local connector stays on default value, which is 0, and that's as far as I got with it.

Based on what i've found in the time I can spend on this, I think that the external HTML is more geared for cases where you will upload the PDF to switch where you can do what you want with the entered values using HTTP requests and responses. The catch is that I specifically DONT want to have to upload the PDF first, since upload speeds in South Africa leave much to be desired and the job in question needs to be preflighted instantly, often with the customer who brought the file in standing on the opposite side of the desk, waiting.

Thanks for your responses, it is appreciated.
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: PDF creation fails when variables are used

Post by saitok »

Oh, I thought for sure that the value users entered into External HTML form will be reflected to XML Metadata as is.
Thank you very much for the details!! :mrgreen:
Post Reply