Is there any file pdf version which allow for automatic(or manual) addition of http source of document? - pdf

Is there any pdf version which allow for automatic(or manual) addition of http source of document ?
Scenarion of this problem from user side looks like that :
I found disire document in pdf format on web.
I save it.
In a few months I open this document and I wish to find the web page where I've found it.
It would be nice to have somewhere address of that file, of course it could be manually written in soe text file, but usually there are problems with copy+paste of pdf documents titles.

If you can modify your PDF files before sending them to the browser, then there are several places where you could put the URL where the document came from:
You could use a node in the "logical structure" tree (chapter 14 part 7 of the PDF reference document). This tree will show up in Acrobat Reader in the "Model Tree" tab.
You could add a hyperlink annotation to the top or bottom of each page, or the first page, or in a new page that you can add at the beginning or at the end of the file. I personally think this is the best approach since the link will be click-able.
You could add a button field on a page that fires a GoTo action that is linked to the source URL. Actions are explained in chapter 12 - Interactive Features of the PDF reference document.
You could add a bookmark(outline) that points to a named destination that is linked to the source URL. Named Destinations are also explained in chapter 12. This approach can also be used with just one click, and it is possible to hide the bookmarks tab if we will not use it.
You could add it as a Document property as #Bobrovsky said.

PDF allows you to add custom values to document information dictionary (see 14.3.3, "Document Information Dictionary" in PDF Reference). You might put your URL there. Adobe Reader will show custom values in Document Properties dialog on the Advanced tab.
Starting from PDF 1.4 (Acrobat 5x and later) you might add URL to XMP Metadata stream referenced from document catalog (see 14.3 Metadata in PDF Reference). Adobe Reader will show metadata properties too if you put them in Custom scheme.
Acrobat Professional could be used to add custom values or XMP metadata. Almost any PDF library that can open and save PDFs could be used for the task too.
I think there is no other places in a PDF document that you can use to store your information.
PDF Reference

Related

Can you embed a separate pdf into Indesign and open it after exporting to PDF?

I would like to ask the following if possible. We have a client that wants a separate pdf document, embedded in a main pdf document and opens when you click it. Like the function in MS Word where you can attach another Word document inside a Word document (Word-ception, lol) and you can still open it.
I've tried it in Acrobat Pro with the Attachment and Link tools. Another option was to put the link document in an ftp server for accessibility. but our client really wants this functionality. Is this possible in Indesign?
Thank you!
Using Word as your example vehicle there are several ways to link 2 documents.
One is an appendix to the other, in PDF terms is a merge or binding but its one flowing document with separate sequential sections/chapters.
Another way is to link to an external file, in PDF terms a hyperlink to a relative second file, which can be locally folder relative or a web absolute reference. You have tried that.
In Word we can add objects internally with icons, in PDF that can be an annotation comment attachment to save externally and action accordingly. You also seem to discount that approach.
Finally PDF offers an Adobe Specific Structure where multiple PDFs attachments can be imbedded in an overall PDF wrapper. These are called Portfolios and not! to be confused with their portfolio service
They are unpopular since in a browser without Adobe Reader they should only offer the cover page.
Whilst in securer offline readers the files may well be shown as attachments that you need to save or independently open to view them.
Only some non Acrobat viewers may view them as a collection. And in the past that required runing insecure SWFlash, But I understand that has changed ?
Here is how the 3 internal PDF files seen above were shown in older Acrobat 9.
Possibly the best experience is using Foxit Reader

How to convert DOCX to PDF with nameddest to be linkable in FireFox and Chrome

From my website, I'm linking several sections within a PDF document using URL in format http://www.example.com/Document.pdf#nameddest=sectionXY
(as discussed e.g. here).
My PDF document is manually created from a DOCX document using the "PDF export" function in MS-Word 2016. The labels are marked as MS-Word bookmarks in the source document.
Unfortunately, the PDF viewer in the web browser scrolls to the proper section only in the Google Chrome. In other browsers (FireFox, IE 11 or Edge) the PDF document is always opened on the first page.
I'm sure my solution used to work several years ago both in Chrome, FireFox and IE.
Is there any way to make it work at least in Chrome and FireFox?
I'm able to use another converter (or even some PDF library) but I cannot afford to have my source document in any other format than DOCX. I'm even able to mark my "labels" another way than using MS Word bookmarks.
Word's PDF export may or may not create "named destinations" in the PDF file. It seems to vary based on platform (Mac vs Windows) and by version (2010 vs 2016).
LibreOffice can import .docx and has PDF export with specific options for creating named destinations from the document bookmarks.
Chrome uses PDFium Firefox uses PDF.js as its built-in PDF viewer, both of which support navigating to named destinations with #nameddest=sectionXY as well as some other navigation styles specified in RFC like #page=2. (See a related question on linking to sections.)
You can check your PDF file for named destinations with Popper's pdfinfo or other tools (see a related question on Unix.SE about listing named destinations).
This is probably not something you'll be able to change.
The PDF standard itself for instance does not really specify whether links like the one you posted should work. So support for them is not something you commonly find.
Of course if the browser is open source, you may always post a pull request.

Page Templates with Form XObject in PDF

I'm writing a PDF generation library and wanted to add the the ability to use other PDFs as templates. The specification notes a TemplateInstantiatedproperty on pages with the alias of the template object should be all that is needed.
Here is a gist of the pdf content:
https://gist.github.com/tyre/89c12f8203181f078001
The template itself is stored in object 16 and the page in object 19.
qpdf --check reports the PDF as invalid:
WARNING: tmp/alpaca.pdf: file is damaged
WARNING: tmp/alpaca.pdf (file position 32089): xref not found
WARNING: tmp/alpaca.pdf: Attempting to reconstruct cross-reference table
checking tmp/alpaca.pdf
PDF Version: 1.7
File is not encrypted
File is not linearized
I'm afraid your PDF document is completely and utterly broken and that you have misunderstood a number of key concepts. You cannot simply incorporate a complete PDF file into another PDF file in the way you have done and expect that to work.
The template system you are referring to is intended to include "hidden" pages - not referenced in the pages tree in the PDF file - in the context of an interactive form document (or interactive document in general). That doesn't sound like what you are intending to do. And these pages need to be valid PDF pages. You can in other words not just include the original PDF document verbatim and expect the PDF reader to sort things out; you need to insert a syntactically correct PDF page object.
What you want to do is take the content of a document and apply that as a background to a document. This most commonly is done using XObjects. Pseudo-code for this could be:
Open the original PDF document
Open the "template" document
Read the template document and copy all elements from the template page into a newly created XObject in the original PDF document.
Modify the page contents of the pages in the original PDF document to paint the new XObject at the beginning of the page description of the existing pages.
It's important to note that again, you're not supposed to simply insert the template document into the stream for the newly created XObject. You will have to create a valid XObject that contains a properly formed resources dictionary referencing all resources needed by your XObject, and that contains the content stream from your template document.
As already indicated in comments, the PDF presented by the OP is structurally defect, the cross reference table position and entries are wrong. Furthermore the transition from one PDF revision to a next update looks questionable. Essentially, therefore, the OP will have to provide a sample PDF which is at least syntactically correct.
That been said, though, the OP indicated he was
writing a PDF generation library and wanted to add the the ability to use other PDFs as templates. The specification notes a TemplateInstantiatedproperty on pages with the alias of the template object should be all that is needed.
The Named Pages mechanism is not meant for something like that. Its main current use (if it is used at all) is in the context of spawning page templates by Acroform actions.
For using pages from other PDFs, one can simply copy them (and the referenced other objects) from the source PDF if they are to be used as separate pages as is; and if multiple templates are to be put onto a single target page, one can wrap the copied sources into form xobjects and include them in the target page.

PDF downloading instead of opening in new tab

This is not a back-end programming question. I can only modify the markup or script (or the document itself). The reason I'm asking here is because all my searches for appropriate terms inevitably lead to questions and solutions about programming this functionality. I'm not trying to force it via progrmaming; I have to find out why this PDF is behaving differently.
So:
I have a bunch of links to PDFs on a page. Most of them open in new tabs, but one of them, the most recent, starts to open in a tab, but then the tab closes and the PDF gets downloaded as a file instead. All markup is consistent - there's nothing differnt about the odd-man-out except the actual URL.
You can see this here:
http://calwater.mwnewsroom.com/Investor-Relations/Financial-Reports/Annual-Reports
All annual reports up to 2012 open in a new tab, but 2013 downloads instead.
This leads me to believe that there is some meta-data property of the PDF itself that tells it how to open, and that, in this case, the 2013 PDF was created using different settings.
Apparently, the PDF was saved out to PDF from InDesign.
Does anyone have any insight?
Problem solved. There was simply an error in the string (like an extra period) that references the attachment such that it couldn't tell it was a PDF. Fixing the reference fixed the problem.

Editing Meta Data in PDF using Lotus Notes

I have an application, which has pdf attachment inside documents. Need to edit the pdf meta data and append or add document information(some field values from document) into that pdf.
I want to add the values into meta data so that when pdf is printed these values should not be seen. If we go to File Properties of any pdf we can find Author and other information, it should similarly show field values which I want to insert.
All above functionality has to be done using Lotus Notes, might be any tool can help.
I am using CutePDF SDK in one of my recent project to manipulate PDF files. You install a COM object on the system (cclient or server) where the code is executing, then you can update meta data like author, etc. Even password protect the file if you like.
You can download a demo version here: http://www.cutepdf.com/solutions/formsdk.asp
In your case, you must detatch the PDF file first, the perform the changes and then reattach it to the Notes document.
If Java is an option you can try iText. http://itextpdf.com/
We use that to generate PDF's from Lotus.