Javascript this.flattenPages(); shows hidden fields...
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Javascript this.flattenPages(); shows hidden fields...
Using build 2.5.196, when I have a form loaded with Hidden Text Fields, and I execute the following JavaScript command:
this.flattenPages();
The hidden fields become visible.
Easy to reproduce:
1. Load the viewer.
2. Load the attached PDF.
3. ^J to load the JavaScript Console.
4. Enter "this.flattenPages();"
5. Execute the script.
-----
*** Please prevent other people from viewing the PDF Form attached.
Is there a work around using PDF Tools or ?????
this.flattenPages();
The hidden fields become visible.
Easy to reproduce:
1. Load the viewer.
2. Load the attached PDF.
3. ^J to load the JavaScript Console.
4. Enter "this.flattenPages();"
5. Execute the script.
-----
*** Please prevent other people from viewing the PDF Form attached.
Is there a work around using PDF Tools or ?????
Last edited by DSSavant on Fri Jan 06, 2012 8:51 pm, edited 1 time in total.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Just a quick note. I have found a hack-around. I tried to remove the hidden form fields but the current viewer does not have that support so I ended up setting the form field's display rectangle to 0, 0, 0, 0. Sometimes I think I should get the Master Hacker award 
No hurry on the fix as this _seems_ to be working for now. I'm not sure if all of my forms will put up with not having a true area to render in though.

No hurry on the fix as this _seems_ to be working for now. I'm not sure if all of my forms will put up with not having a true area to render in though.
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Thanks for report. I have fixed this issue. The fix will be available in the next build.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
When should I be expecting a new build?
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
I have a follow-on issue to report regarding the attached PDF.
For some reason, when you save the PDF with one of the radio buttons selected and thus part of the form hidden, after unloading and loading the PDF again, different parts of the form will hide/show.
Reproduction:
Load attached form.
Select "New Order:" radio button. There should not be a grid showing on the bottom of the document.
Save.
Close/Unload the PDF.
Reload the PDF.
Notice the grid showing at the bottom of the document.
The same issue occurs with all of the radio buttons. I have performed the same tests using Acrobat 9.X to ensure it was not a PDF problem and found that Acrobat works (sorry, I was hoping it would fail miserably).
Scream if you need more. I'm able to reproduce this at will using build 196.
For some reason, when you save the PDF with one of the radio buttons selected and thus part of the form hidden, after unloading and loading the PDF again, different parts of the form will hide/show.
Reproduction:
Load attached form.
Select "New Order:" radio button. There should not be a grid showing on the bottom of the document.
Save.
Close/Unload the PDF.
Reload the PDF.
Notice the grid showing at the bottom of the document.
The same issue occurs with all of the radio buttons. I have performed the same tests using Acrobat 9.X to ensure it was not a PDF problem and found that Acrobat works (sorry, I was hoping it would fail miserably).
Scream if you need more. I'm able to reproduce this at will using build 196.
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Thanks again for the report, and again it is fixed 

PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Nice! Just let me know when a new build is available.
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
HI DSSavant,
I've made a note to email you at the address used on this forum account when the next build is ready. Would you prefer that or a post here?
Paul
I've made a note to email you at the address used on this forum account when the next build is ready. Would you prefer that or a post here?
Paul
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Email works great. Thanks Paul.
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
O k- email it will be.


Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Paul, my company is trying to ship our product in August. What are the odds at getting a build before or on the second week of August?
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Hi again DSSavant,
it's not planned at present to have a build by then. Let me see what we can do. I should know by the first week in August if we can do something for you.
hth
it's not planned at present to have a build by then. Let me see what we can do. I should know by the first week in August if we can do something for you.
hth
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Sorry I did not get back to you earlier, I was on vacation.
I just wanted to stress to you that my company cannot ship without this one core item being fixed; it is a very common "code path" in our product. If you release a formal build early, that would be great. If not that, I would be willing to take an engineering build or ...
I just wanted to stress to you that my company cannot ship without this one core item being fixed; it is a very common "code path" in our product. If you release a formal build early, that would be great. If not that, I would be willing to take an engineering build or ...
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Hi DSSavant,
when I discussed this with the Development team leader he suggested that we may do a special build. How that might look I'm not yet sure. I'll touch base with him and shold have someting a little more concrete by tomorrow.
hth
when I discussed this with the Development team leader he suggested that we may do a special build. How that might look I'm not yet sure. I'll touch base with him and shold have someting a little more concrete by tomorrow.
hth
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
no problem,
just so long as we agree that it was `may`no promises yet.
just so long as we agree that it was `may`no promises yet.

Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Please let me know the name of installer you are using, and I will send you it with new build.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
I download and install "pdfvSDKFull.exe". Is that what you are asking? Scream if not. I should add, I also download the respective MSM - "ViewerAX_x86.msm".
Thank you!
Thank you!
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
hi DSSavant,
Ivan will prepare an msm for you for tomorrow, that's why he was asking what installer you are using. Once he has it ready he will post it on a server and send you the download link by PM through this forum. This is not a publicly available build.
Will that work for you?
Ivan will prepare an msm for you for tomorrow, that's why he was asking what installer you are using. Once he has it ready he will post it on a server and send you the download link by PM through this forum. This is not a publicly available build.
Will that work for you?
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Works great. Thanks.
-
- Site Admin
- Posts: 7362
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Great - you should hear from him tomorrow then.


Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Thanks, I have downloaded, installed on my Development box and all seems to be working properly. I will pass on to my QA department.
Again, thank you for the great customer support, time, and effort!
Again, thank you for the great customer support, time, and effort!
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Javascript this.flattenPages(); shows hidden fields...
Our Pleasure DSSavant!
Cheers,
Stefan
Cheers,
Stefan
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Javascript this.flattenPages(); shows hidden fields...
Well, mostly all fixed 
There is one case in which everything works great in the Tracker Viewer and yet fails in Acrobat. I've updated a ZIP file with full reproduction steps, before and after PDFs, pretty pictures, etc.
"Form Flattening bug dealing with how Acrobat.PDF" - the README instructions.
"FlatteningBug.PDF" - untainted file.
"NotRight.PDF" - flattened, fails in Acrobat, Succeeds in the Viewer.
Scream if you need more.
PDF Version is the most recent - Sept 2011.

There is one case in which everything works great in the Tracker Viewer and yet fails in Acrobat. I've updated a ZIP file with full reproduction steps, before and after PDFs, pretty pictures, etc.
"Form Flattening bug dealing with how Acrobat.PDF" - the README instructions.
"FlatteningBug.PDF" - untainted file.
"NotRight.PDF" - flattened, fails in Acrobat, Succeeds in the Viewer.
Scream if you need more.
PDF Version is the most recent - Sept 2011.
Last edited by DSSavant on Fri Jan 06, 2012 8:52 pm, edited 1 time in total.
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Javascript this.flattenPages(); shows hidden fields...
It is known issue introduced in 198 build with text content created by the viewer. It is already fixed and the fix will be available in 199 build going to be released later today.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.