i am using itext version 2.0.3 in java, and I am trying to set Bleed and Slug settings for the pdf document that I output. so what I want to do is, take 8 inputs from user(4 for bleed and 4 for slug), namely top,bottom,left and right(both for bleed and slug), and then once I write everything from the pdfWriter to the pdfDocument, set this bleed box and and slug box around the document. but i could not find any documentation for such in itext 2.0.3 and also in the recent version.
here is the below code as requested. doc is the structure that i get from user that contains all the relavent information including bleed and trim values in mm. for trim also there will be four values just like bleed
`pdfDocument = new com.lowagie.text.Document();
pdfWriter = PdfWriter.getInstance(pdfDocument, new
FileOutputStream(outputFile));
pdfWriter.setPDFXConformance(pdfXConformance);
pdfDocument.addTitle(doc.getTitle() == null ? "" : doc.getTitle());
pdfDocument.addSubject(doc.getSubject() == null ? "" :
doc.getSubject());
pdfDocument.addKeywords(doc.getKeywords() == null ? "" :
doc.getKeywords());
pdfDocument.addAuthor(doc.getAuthor() == null ? "" : doc.getAuthor());
pdfDocument.addCreator("some name");
pdfDocument.addProducer();
pdfDocument.addCreationDate();
setPageViewAndStartPageProperty(doc);
pdfWriter.setLinearPageMode();
double bleedTop = doc.getIsBleedAndSlug() ? doc.getBleedTop() : 0;
double bleedBottom = doc.getIsBleedAndSlug() ? doc.getBleedBottom() : 0;
double bleedLeft = doc.getIsBleedAndSlug() ? doc.getBleedLeft() : 0;
double bleedRight = doc.getIsBleedAndSlug() ? doc.getBleedRight() : 0;
//not sure about the below lines like what the structure should be
pdfWriter.setBoxSize("bleed",new Rectangle(x,w,y,z));
pdfWriter.setBoxSize("trim",new Rectangle(x1,w1,y1,z1));`
so i want the x,w,y, and z coordinates from the bleedTop,left,bottom and right so as i can apply it properly.