Showing results for 
Search instead for 
Did you mean: 

blank first page of pdf

Diadem 2012

I've had a recurring issue which I've l lived with for quite a while and have not been able to narrow down what causes it.

Sometimes a report exported as a PDF has a blank page 1 (missing what should be on page 1 - I only see a black border outline when opening the PDF) and from page 2 on looks normal. Originally the reports were created from a template TDR. After we upgraded to Diadem 2012 I rewrote the report code to dynamically create each report from scratch and the problem happened using both methods. I run this code on different computers and using a variety of source files and I haven't been able to figure out a pattern. 


All the reports are being automatically generated so I don't have a TDR to compare to the PDF. 


For example, today I generated an Attribute, a dirty and a clean report. Page 1 of the attribute report was blank, but the dirty and clean reports look fine. Page 1 for all 3 reports is a page containing the serial numbers which were used to generate the rest of the report. If there are enough serial numbers to require more than one page, the second page prints fine.


I have a different product which page 1 of the dirty report is blank. There is no attribute report for this product. It's almost like there is some initialization code that needs to happen is not happening, but it fixes itself once it goes on to page 2, and all future reports for the product work fine. But I'm using the same code on a different computer and it is not generating blank pages. 


The code for the first page of the attribute, dirty and clean is the same code. The attribute and dirty/clean routines are in different code files so the routine which generates the serial number page is copied.


Looking for any ideas.




0 Kudos
Message 1 of 4

Hey JDeckert,


I have heard of issues that peopl have had with the PDF Export function.  I'm not sure if this will solve anything but it may help.  Check out this forum post and look at the solution.  It has helped people experiencing problems with Export PDF




It was written for Windows Vista so it's pretty much the same.  


In step two for Windows 7 select Printer Properties instead of Properties.


Hopefully this helps

0 Kudos
Message 2 of 4

Creating another printer port didn't change anything. I still get a blank first page on the first report of 3 (or 4) automatically generated reports based on the same product data. Then when the reports for a new product are run, the first report has a blank page again.

0 Kudos
Message 3 of 4



I feel for you, this looks like a hard one to narrow down to a solution.  I have made automatically generating reports to PDF as well.


It does sound some initialization code is not being ran consistently.  With my limitations of can't see code, and really do not have the time if did have code.  But I can offer some tips used to trouble shoot similar issues.


1)  As far as comparing the tdr to PDF. You can add right before the PDF is made, a command to save the tdr file. That will allow you to verify that the PDF output command is not the issue. It will also allow code to be developed to detect it missing, and log it.


2) Once you have a TDR of the first page not happening, you can develop code to look at the report objects to check that the first page has values in it. 


3) Once you have the code that will detect the first page not being present, then this sub or function can be can at various pages of the app, with results logged to DIAdem log or other fie.  This has the potential to reduce the possible area causing the issue.


General notes: 

a) When you are refering to the specific pages. Is this by page number or by page name?  I usually use page name to get the page I want.


b)  When it builds the report and report objects, Is the app naming the objects as it makes them?  If it was then it would make is more straightforward to check for them missing. 


I am thinking that once you have a sample TDR with the missing first page information, It opens up the troubleshooting options.


If some examples of the above are helpful. Just let me know.






0 Kudos
Message 4 of 4