mromin (2) [Avatar] Offline
#1
The book describes how automatic processes sometimes can create undesirable empty pages, which is my case. Is there a way to identify empty pages and remove them from the document?
blowagie (284) [Avatar] Offline
#2
Re: Question concerning blank or EmptyPages
Please tell us more about the automatic process.
Are you referring to the blank pages caused by using onStartPage instead of onEndPage?
In that case: move your code from onStartPage to onEndPage.
mromin (2) [Avatar] Offline
#3
Re: Question concerning blank or EmptyPages
I am using a conversion utility AutoDWG that converts AutoCAD dwg files to PDF. The process sometimes creates empty/blank pages. All drawing files are a single page, but the utility sometimes creates extra empty pages at the end. In my program, I am calling the conversion utility, taking the PDF files created from the utility and stamping the PDF file. I would like to remove the empty/blank pages from the PDF before I stamp them so that I am not putting a watermark on an empty page and saving it. I am not using iText to create the PDF document only to stamp it.
blowagie (284) [Avatar] Offline
#4
Re: Question concerning blank or EmptyPages
> I am using a conversion utility AutoDWG that converts AutoCAD dwg files to PDF.

OK, that's not iText related.

> The process sometimes creates empty/blank pages.

What do the people at autodwg.com say about this?
Have you contacted their support site?

> I am calling the conversion utility, taking the PDF files created
> from the utility and stamping the PDF file.

OK, this is iText related.

> I would like to remove the empty/blank pages from the PDF.

I know from experience that what you see as a blank or empty page
in Adobe Reader (or in another viewer) is in general not empty when
you open up the PDF in an analyzing tool (for instance with iText RUPS).
Most of the time such a page has PDF syntax in its page content.
What you can expect in an empty page depends on the PDF producer
(that's why you should first ask support at autodwg what's happening).

Without seeing the PDF and without inspecting the page that is supposed
to be blank, I can't do anything. Please post an example to the mailing list.

As you know from my recent answers on this forum I have a son with cancer,
and I'm not that active anymore. Questions on this forum were answered by
one and only one person: me. Questions posted to the mailing list are answered
by a very active community (1400+ subscribers).

br,
Bruno