pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stahle, Patrick" <patrick.sta...@te.com>
Subject RE: Strange "Save As" issue with Adobe Reader 11 / DC with PDF being encrypted by PDFBox 2 snapshot
Date Thu, 17 Mar 2016 13:21:39 GMT
Hi Tillman,

Ok,  I think I have the  file uploaded to the following:
http://wikisend.com/download/381906/tmp_10435-Technical Data Package BOMAnarkStampedPDFBox102259703.pdf

The link is hard for me to test since I have to do this all from my phone. If it says not
found or expired try putting in 381906 from the download page...


Thanks,
Patrick

-----Original Message-----
From: Stahle, Patrick [mailto:patrick.stahle@te.com] 
Sent: Thursday, March 17, 2016 8:10 AM
To: users@pdfbox.apache.org
Subject: RE: Strange "Save As" issue with Adobe Reader 11 / DC with PDF being encrypted by
PDFBox 2 snapshot

Hi Tillman,
Do you have an apache email address or another email address I can just send the pdf to you?
This MoveIt site would requires me to have an sending email address regardless. So I might
as well just send it directly? 

 Thanks,
Patrick

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Wednesday, March 16, 2016 3:38 PM
To: users@pdfbox.apache.org
Subject: Re: Strange "Save As" issue with Adobe Reader 11 / DC with PDF being encrypted by
PDFBox 2 snapshot

Can you reopen the file you saved with PDFBox? If not, please open an issue in JIRA and attach
your file.

If yes, just upload the file somewhere, I'd like to have a look at the encryption dictionaries.

Tilman

Am 16.03.2016 um 20:19 schrieb Stahle, Patrick:
> Hi,
>
> This is not a general problem and only occurs with original PDF generated with 3D content
using Anark. The file when loaded seems to have encrypted and loads just find in Adobe Reader,
but when we try to do a "Save As" we get the following error:
> "The document could not be saved. There was a problem reading this document 21."
>
> If I do a control click on the "ok" button. I get the following message:
> "This direct object already has a container."
>
> Any ideas what might be causing this problem? We have tried the same thing with iText
and it does not experience this problem.
>
> Sample Code that reproduces the problem:
>                                  PDDocument doc = null;
>
>                                  try {
>                                                  doc = PDDocument.load(pdfIn);
>                                                  PDPage page = null;
>                                                  AccessPermission apermission = new AccessPermission();
>                                                  apermission.setCanAssembleDocument(false);
>                                                  apermission.setCanExtractContent(false);
>                                                  apermission.setCanExtractForAccessibility(true);
>                                                  apermission.setCanFillInForm(true);
>                                                  apermission.setCanModifyAnnotations(true);
>                                                  apermission.setCanPrint(true);
>                                                  apermission.setReadOnly();
>                                                  StandardProtectionPolicy spp = new StandardProtectionPolicy(UUID.randomUUID().toString(),
"", apermission);
>                                                  doc.protect(spp);
>
>                                                  for (int i = 0; i < doc.getNumberOfPages();
i++) {
>                                                                  page = doc.getPage(i);
>                                                                  PDPageContentStream
canvas = new PDPageContentStream(doc, page, PDPageContentStream.AppendMode.APPEND, true, true);
>                                                                  canvas.saveGraphicsState();
>                                                                  canvas.restoreGraphicsState();
>                                                                  canvas.close();
>                                                  }
>                                                  doc.save(pdfOut);
>                                                  bRet = true;
>                                  }
>                                  finally {
>                                                  if (doc != null) {
>                                                                  doc.close();
>                                                  }
>                                  }
>
> Thanks,
> Patrick
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message