Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get name from object #76

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vlasovsoft1979
Copy link

@vlasovsoft1979 vlasovsoft1979 commented Sep 25, 2024

For example, store Image ColorSpace in the separate object:

8 0 obj
<<
/Type /XObject
/Subtype /Image
/ColorSpace 10 0 R
>>
...
10 0 obj
/DeviceRGB
endobj

Copy link
Owner

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit on the addition to the header. Also, if we have a getter we should have a way to create a name object (pdfioFileCreateNameObj).

pdfio.h Outdated
@@ -220,6 +220,8 @@ extern pdfio_obj_t *pdfioObjCopy(pdfio_file_t *pdf, pdfio_obj_t *srcobj) _PDFIO_
extern pdfio_stream_t *pdfioObjCreateStream(pdfio_obj_t *obj, pdfio_filter_t compression) _PDFIO_PUBLIC;
extern pdfio_array_t *pdfioObjGetArray(pdfio_obj_t *obj) _PDFIO_PUBLIC;
extern pdfio_dict_t *pdfioObjGetDict(pdfio_obj_t *obj) _PDFIO_PUBLIC;
extern const char *pdfioObjGetName(pdfio_obj_t *obj) _PDFIO_PUBLIC;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab between "const char" and "*pdfioObjGetName". Also, please move this down between ...GetLength and ...GetNumber so it is sorted alphabetically.

@michaelrsweet michaelrsweet added this to the Future milestone Sep 25, 2024
@michaelrsweet michaelrsweet added enhancement New feature or request priority-low labels Sep 25, 2024
@michaelrsweet michaelrsweet self-assigned this Sep 25, 2024
@vlasovsoft1979 vlasovsoft1979 changed the title Get name from object. For example, store Image ColorSpace in the separate object. Get name from object Sep 25, 2024
@vlasovsoft1979
Copy link
Author

@michaelrsweet
This is my first PR to github. Please let me know if I forget something. I've fixed your comments. Now it's your turn.

Copy link
Owner

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, see comment. And thank you!

pdfio-object.c Outdated
@@ -268,6 +268,26 @@ pdfioObjGetDict(pdfio_obj_t *obj) // I - Object
}


//
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, please move this later in the file before pdfioObjGetNumber.

@michaelrsweet
Copy link
Owner

OK, holding for the next feature release (have a bug fix release to do first...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants