logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
seki  
#1 Posted : Wednesday, September 7, 2022 9:09:01 AM(UTC)
Quote
seki

Rank: Newbie

Groups: Registered
Joined: 10/6/2016(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
I know pdfium can edit PDF properties like Author, CreationDate, Subject, Title, and Producer etc.
https://pdfium.patagames...DK_Document.htm#section5

Is there a way to edit "custom properties" with pdfium?
Paul Rayman  
#2 Posted : Thursday, September 8, 2022 7:17:19 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,080

Thanks: 6 times
Was thanked: 126 time(s) in 123 post(s)
Hello,

What is a custom property? I assume this can be achieved with an appropriate dictionary.
Also you can try Pdfium.FPDF_SetMetaTex method.

Code:
Pdfium.FPDF_SetMetaText(document.Handle, "CustomTag", "custom value");

Edited by user Thursday, September 8, 2022 7:31:26 AM(UTC)  | Reason: Not specified

seki  
#3 Posted : Thursday, September 8, 2022 9:15:34 AM(UTC)
Quote
seki

Rank: Newbie

Groups: Registered
Joined: 10/6/2016(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
customprop.png

"Custom properties" meant attached images.
I would like to read and/or save these properties of pdf files.

The user manual of Pdfium.FPDF_SetMetaTex method says
>Currently, The tag can be one of "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", or "ModDate".

Later I will try Pdfium.FPDF_SetMetaTex method with Custom Tag.
seki  
#4 Posted : Wednesday, September 21, 2022 11:44:42 AM(UTC)
Quote
seki

Rank: Newbie

Groups: Registered
Joined: 10/6/2016(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
Thank you for advice.
I found that I could get custom properties using Pdfium.FPDF_GetMetaText, and set custom properties using Pdfium.FPDF_SetMetaText.

By the way, how can I save a PDF file that I changed using Pdfium.FPDF_SetMetaText?
I could not understand how to use "Pdfium.FPDF_SaveAsCopy".
seki  
#5 Posted : Thursday, September 22, 2022 9:43:36 AM(UTC)
Quote
seki

Rank: Newbie

Groups: Registered
Joined: 10/6/2016(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
I found how to save PDF by myself. Thanks.

Originally Posted by: seki Go to Quoted Post
Thank you for advice.
I found that I could get custom properties using Pdfium.FPDF_GetMetaText, and set custom properties using Pdfium.FPDF_SetMetaText.

By the way, how can I save a PDF file that I changed using Pdfium.FPDF_SetMetaText?
I could not understand how to use "Pdfium.FPDF_SaveAsCopy".


Quick Reply Show Quick Reply
Users browsing this topic
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.